main.go
@@ -118,6 +118,7 @@ // 将外部传进来的rect(top,bottom,left,right)转化为自己内部的rect(left top width height) func rectFormat(rcobj *protomsg.Rect) ruleserver.Rect { rect := ruleserver.Rect{} fmt.Println("看一下传入的矩形数据:",rcobj.Left,rcobj.Top,rcobj.Right,rcobj.Bottom) rect.X = float64(rcobj.Left) rect.Y = float64(rcobj.Top) rect.Width = float64(rcobj.Right - rcobj.Left)