2015-04-29 12:33:32 +00:00
|
|
|
// Copyright 2010 The draw2d Authors. All rights reserved.
|
|
|
|
// created: 13/12/2010 by Laurent Le Goff
|
|
|
|
|
2015-08-14 20:22:01 +00:00
|
|
|
package draw2dimg
|
2015-04-29 12:33:32 +00:00
|
|
|
|
|
|
|
import (
|
2015-09-07 01:03:03 +00:00
|
|
|
"github.com/golang/freetype/raster"
|
|
|
|
"golang.org/x/image/math/fixed"
|
2015-04-29 12:33:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type FtLineBuilder struct {
|
|
|
|
Adder raster.Adder
|
|
|
|
}
|
|
|
|
|
|
|
|
func (liner FtLineBuilder) MoveTo(x, y float64) {
|
2015-09-07 01:03:03 +00:00
|
|
|
liner.Adder.Start(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)})
|
2015-04-29 12:33:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (liner FtLineBuilder) LineTo(x, y float64) {
|
2015-09-07 01:03:03 +00:00
|
|
|
liner.Adder.Add1(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)})
|
2015-04-29 12:33:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (liner FtLineBuilder) LineJoin() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (liner FtLineBuilder) Close() {
|
|
|
|
}
|
|
|
|
|
|
|
|
func (liner FtLineBuilder) End() {
|
|
|
|
}
|