forked from joejulian/gio
op/clip: fix Path open state
If a Move/MoveTo did not move the pen, the Path was still set as open. Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
@@ -154,6 +154,9 @@ func (p *Path) Move(delta f32.Point) {
|
||||
|
||||
// MoveTo moves the pen to the specified absolute coordinate.
|
||||
func (p *Path) MoveTo(to f32.Point) {
|
||||
if p.pen == to {
|
||||
return
|
||||
}
|
||||
p.open = p.open || p.pen != p.start
|
||||
p.end()
|
||||
p.pen = to
|
||||
|
||||
Reference in New Issue
Block a user