| 1 |
package drawing |
| 2 |
|
| 3 |
import ( |
| 4 |
"github.com/golang/freetype/raster" |
| 5 |
"golang.org/x/image/math/fixed" |
| 6 |
) |
| 7 |
|
| 8 |
|
| 9 |
type FtLineBuilder struct { |
| 10 |
Adder raster.Adder |
| 11 |
} |
| 12 |
|
| 13 |
|
| 14 |
func (liner FtLineBuilder) MoveTo(x, y float64) { |
| 15 |
liner.Adder.Start(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)}) |
| 16 |
} |
| 17 |
|
| 18 |
|
| 19 |
func (liner FtLineBuilder) LineTo(x, y float64) { |
| 20 |
liner.Adder.Add1(fixed.Point26_6{X: fixed.Int26_6(x * 64), Y: fixed.Int26_6(y * 64)}) |
| 21 |
} |
| 22 |
|
| 23 |
|
| 24 |
func (liner FtLineBuilder) LineJoin() {} |
| 25 |
|
| 26 |
|
| 27 |
func (liner FtLineBuilder) Close() {} |
| 28 |
|
| 29 |
|
| 30 |
func (liner FtLineBuilder) End() {} |