Added CopyPath to the GraphicContext interface.

This commit is contained in:
redstarcoder 2016-10-17 19:36:31 -04:00
parent 51ba099819
commit 8380dd9458
2 changed files with 6 additions and 0 deletions

View file

@ -132,6 +132,10 @@ func (gc *StackGraphicContext) BeginPath() {
gc.Current.Path.Clear()
}
func (gc *StackGraphicContext) CopyPath() *draw2d.Path {
return gc.Current.Path.Copy()
}
func (gc *StackGraphicContext) IsEmpty() bool {
return gc.Current.Path.IsEmpty()
}

2
gc.go
View file

@ -14,6 +14,8 @@ type GraphicContext interface {
PathBuilder
// BeginPath creates a new path
BeginPath()
// CopyPath copies the current path, then returns it
CopyPath() *Path
// GetMatrixTransform returns the current transformation matrix
GetMatrixTransform() Matrix
// SetMatrixTransform sets the current transformation matrix