summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/code.google.com/p/draw2d/draw2d/path.go
blob: b82910e2441f6a857999cd565dcfdbc1d06c318a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2010 The draw2d Authors. All rights reserved.
// created: 21/11/2010 by Laurent Le Goff

package draw2d

type Path interface {
	// Return the current point of the path
	LastPoint() (x, y float64)
	// Create a new subpath that start at the specified point
	MoveTo(x, y float64)
	// Create a new subpath that start at the specified point 
	// relative to the current point
	RMoveTo(dx, dy float64)
	// Add a line to the current subpath
	LineTo(x, y float64)
	// Add a line to the current subpath 
	// relative to the current point
	RLineTo(dx, dy float64)

	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()
}