Skip to content

Commit

Permalink
center_x => x, center_y => y
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Nov 7, 2021
1 parent ed177af commit bd2bf6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions measure.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func newMeasure(v specsp) *measure {
size: size,
text: text,
color: color.RGBA{R: r, G: g, B: b, A: 0xff},
x: v["center_x"].(float64),
y: v["center_y"].(float64),
x: v["x"].(float64),
y: v["y"].(float64),
svgLineStyle: fmt.Sprintf("stroke-width:%d;stroke:rgb(%d, %d, %d);", measureLineWidth, r, g, b),
svgRotate: fmt.Sprintf("rotate(%.1f %d %d)", heading, svgSize>>1, svgSize>>1),
svgSize: svgSize,
Expand Down
16 changes: 8 additions & 8 deletions test/Measure/res/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@
},
{
"type": "measure",
"center_x": 0,
"center_y": 0,
"x": 0,
"y": 0,
"heading": 0,
"size": 150,
"color": 15629590
},
{
"type": "measure",
"center_x": -100,
"center_y": 0,
"x": -100,
"y": 0,
"heading": 60,
"size": 200,
"color": 0
},
{
"type": "measure",
"center_x": -100,
"center_y": 100,
"x": -100,
"y": 100,
"heading": -30,
"size": 100,
"color": 65535
},
{
"type": "measure",
"center_x": 0,
"center_y": 100,
"x": 0,
"y": 100,
"heading": 90,
"size": 10,
"scale": 10,
Expand Down

0 comments on commit bd2bf6c

Please sign in to comment.