mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
vector: remove redundant LineTo calls before Arc
This commit is contained in:
parent
2322acbd9c
commit
84452b0bf8
@ -407,10 +407,8 @@ func (p *Path) AppendVerticesAndIndicesForStroke(vertices []ebiten.Vertex, indic
|
|||||||
var arc Path
|
var arc Path
|
||||||
arc.MoveTo(c.x, c.y)
|
arc.MoveTo(c.x, c.y)
|
||||||
if da < math.Pi {
|
if da < math.Pi {
|
||||||
arc.LineTo(rect[1].x, rect[1].y)
|
|
||||||
arc.Arc(c.x, c.y, op.Width/2, a0, a1, Clockwise)
|
arc.Arc(c.x, c.y, op.Width/2, a0, a1, Clockwise)
|
||||||
} else {
|
} else {
|
||||||
arc.LineTo(rect[3].x, rect[3].y)
|
|
||||||
arc.Arc(c.x, c.y, op.Width/2, a0+math.Pi, a1+math.Pi, CounterClockwise)
|
arc.Arc(c.x, c.y, op.Width/2, a0+math.Pi, a1+math.Pi, CounterClockwise)
|
||||||
}
|
}
|
||||||
arc.MoveTo(c.x, c.y)
|
arc.MoveTo(c.x, c.y)
|
||||||
|
Loading…
Reference in New Issue
Block a user