---
panlei
2019-11-21 2c43d36c526392576b8fb99b31c85ed977299f53
---
2个文件已修改
8 ■■■■ 已修改文件
insertdata/insertDataToEs.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
util/image.go 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
insertdata/insertDataToEs.go
@@ -361,7 +361,7 @@
                            var target1 = new(Target)
                            target1.TargetId = target.Id
                            target1.TargetScore = target.Score
                            target1.TargetType = target.Type
                            target1.TargetType = "action"
                            target1.TargetLocation = Points{TopLeft: Point{target.Location.X, target.Location.Y}, BottomRight: Point{target.Location.X + target.Location.Width, target.Location.Y + target.Location.Height}}
                            targetInfos = append(targetInfos, *target1)
                        }
@@ -562,7 +562,7 @@
                        var target1 = new(Target)
                        target1.TargetId = target.Id
                        target1.TargetScore = target.Score
                        target1.TargetType = target.Type
                        target1.TargetType = "action"
                        target1.TargetLocation = Points{TopLeft: Point{target.Location.X, target.Location.Y}, BottomRight: Point{target.Location.X + target.Location.Width, target.Location.Y + target.Location.Height}}
                        targetInfos = append(targetInfos, *target1)
                    }
util/image.go
@@ -57,7 +57,7 @@
}
// 每边各扩百分之20
func EnlargeSizeForCar(x0, y0, x1, y1 int, i protomsg.Image) (x0_new, y0_new, x1_new, y1_new int) {
func EnlargeSizeForCar(x0, y0, x1, y1 int, i protomsg.Image) (int,int,int,int) {
    // 先把长宽变为一比一
    chazhi := (y1 - y0) - (x1 - x0)
@@ -69,5 +69,5 @@
    if x1 > int(i.Width) {
        x1 = int(i.Width)
    }
    return
    return x0, y0, x1, y1
}