diff --git a/draw2dbase/stack_gc.go b/draw2dbase/stack_gc.go index 8c394fd..a5b01d8 100644 --- a/draw2dbase/stack_gc.go +++ b/draw2dbase/stack_gc.go @@ -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 { diff --git a/gc.go b/gc.go index d76a7ca..b5c20be 100644 --- a/gc.go +++ b/gc.go @@ -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