draw2d/path.go

28 lines
858 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
type Path interface {
2012-04-17 09:03:56 +00:00
// Return the current point of the path
2011-04-27 08:06:14 +00:00
LastPoint() (x, y float64)
2012-04-17 09:03:56 +00:00
// Create a new subpath that start at the specified point
2011-04-27 08:06:14 +00:00
MoveTo(x, y float64)
2015-04-16 09:51:13 +00:00
// Create a new subpath that start at the specified point
2012-04-17 09:03:56 +00:00
// relative to the current point
2011-04-27 08:06:14 +00:00
RMoveTo(dx, dy float64)
2012-04-17 09:03:56 +00:00
// Add a line to the current subpath
2011-04-27 08:06:14 +00:00
LineTo(x, y float64)
2015-04-16 09:51:13 +00:00
// Add a line to the current subpath
2012-04-17 09:03:56 +00:00
// relative to the current point
2011-04-27 08:06:14 +00:00
RLineTo(dx, dy float64)
2012-05-28 07:52:49 +00:00
2011-04-27 08:06:14 +00:00
QuadCurveTo(cx, cy, x, y float64)
RQuadCurveTo(dcx, dcy, dx, dy float64)
CubicCurveTo(cx1, cy1, cx2, cy2, x, y float64)
RCubicCurveTo(dcx1, dcy1, dcx2, dcy2, dx, dy float64)
ArcTo(cx, cy, rx, ry, startAngle, angle float64)
RArcTo(dcx, dcy, rx, ry, startAngle, angle float64)
Close()
}