merge changes

This commit is contained in:
legoff.laurent 2010-12-12 11:05:49 +00:00
parent f23da51ff6
commit e0331338a2
2 changed files with 10 additions and 6 deletions

View file

@ -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)
} }

View file

@ -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
} }