draw2d/path.go

29 lines
733 B
Go
Raw Normal View History

2011-04-27 08:06:14 +00:00
// Copyright 2010 The draw2d Authors. All rights reserved.
// created: 21/11/2010 by Laurent Le Goff
2012-04-17 09:03:56 +00:00
2011-04-27 08:06:14 +00:00
package draw2d
// PathBuilder define method that create path
2015-04-23 16:12:31 +00:00
type PathBuilder interface {
// Return the current point of the current path
2011-04-27 08:06:14 +00:00
LastPoint() (x, y float64)
// MoveTo start a new path at (x, y) position
2011-04-27 08:06:14 +00:00
MoveTo(x, y float64)
// LineTo add a line to the current path
2011-04-27 08:06:14 +00:00
LineTo(x, y float64)
2012-05-28 07:52:49 +00:00
// QuadCurveTo add a quadratic curve to the current path
2011-04-27 08:06:14 +00:00
QuadCurveTo(cx, cy, x, y float64)
// CubicCurveTo add a cubic bezier curve to the current path
2011-04-27 08:06:14 +00:00
CubicCurveTo(cx1, cy1, cx2, cy2, x, y float64)
// ArcTo add an arc to the path
2011-04-27 08:06:14 +00:00
ArcTo(cx, cy, rx, ry, startAngle, angle float64)
// Close the current path
2011-04-27 08:06:14 +00:00
Close()
}