merge changes
This commit is contained in:
parent
f23da51ff6
commit
e0331338a2
2 changed files with 10 additions and 6 deletions
|
@ -77,7 +77,7 @@ func NewGraphicContext(pi *image.RGBA) *GraphicContext {
|
||||||
return gc
|
return gc
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gc *GraphicContext) GetMatrixTransform() (tr MatrixTransform) {
|
func (gc *GraphicContext) GetMatrixTransform() MatrixTransform {
|
||||||
return gc.current.tr
|
return gc.current.tr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,14 +224,18 @@ func (gc *GraphicContext) DrawImage(image image.Image) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gc *GraphicContext) LastPoint() (x, y float) {
|
|
||||||
return gc.current.path.LastPoint()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (gc *GraphicContext) BeginPath() {
|
func (gc *GraphicContext) BeginPath() {
|
||||||
gc.current.path = new(PathStorage)
|
gc.current.path = new(PathStorage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gc *GraphicContext) IsEmpty() bool{
|
||||||
|
return gc.current.path.IsEmpty()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (gc *GraphicContext) LastPoint() (float, float){
|
||||||
|
return gc.current.path.LastPoint()
|
||||||
|
}
|
||||||
|
|
||||||
func (gc *GraphicContext) MoveTo(x, y float) {
|
func (gc *GraphicContext) MoveTo(x, y float) {
|
||||||
gc.current.path.MoveTo(x, y)
|
gc.current.path.MoveTo(x, y)
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ func (p *PathStorage) LastPoint() (x, y float) {
|
||||||
return p.x, p.y
|
return p.x, p.y
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PathStorage) isEmpty() bool {
|
func (p *PathStorage) IsEmpty() bool {
|
||||||
return len(p.commands) == 0
|
return len(p.commands) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue