CopyPath -> GetPath. Also return Path instead of *Path.

This commit is contained in:
redstarcoder 2016-10-19 14:53:36 -04:00
parent 8380dd9458
commit 4a3322e29e
2 changed files with 3 additions and 3 deletions

View File

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

2
gc.go
View File

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