Add Shift to the PathBuilder
This commit is contained in:
parent
b1c1307780
commit
c6bc44d31e
2 changed files with 6 additions and 0 deletions
|
@ -160,6 +160,10 @@ func (gc *StackGraphicContext) ArcTo(cx, cy, rx, ry, startAngle, angle float64)
|
|||
gc.Current.Path.ArcTo(cx, cy, rx, ry, startAngle, angle)
|
||||
}
|
||||
|
||||
func (gc *StackGraphicContext) Shift(x, y float64) {
|
||||
gc.Current.Path.Shift(x, y)
|
||||
}
|
||||
|
||||
func (gc *StackGraphicContext) Close() {
|
||||
gc.Current.Path.Close()
|
||||
}
|
||||
|
|
2
path.go
2
path.go
|
@ -22,6 +22,8 @@ type PathBuilder interface {
|
|||
CubicCurveTo(cx1, cy1, cx2, cy2, x, y float64)
|
||||
// ArcTo adds an arc to the current subpath
|
||||
ArcTo(cx, cy, rx, ry, startAngle, angle float64)
|
||||
// Shift moves every point in the path by x and y
|
||||
Shift(x, y float64)
|
||||
// Close creates a line from the current point to the last MoveTo
|
||||
// point (if not the same) and mark the path as closed so the
|
||||
// first and last lines join nicely.
|
||||
|
|
Loading…
Reference in a new issue