aboutsummaryrefslogtreecommitdiff
path: root/hershey.go
diff options
context:
space:
mode:
Diffstat (limited to 'hershey.go')
-rw-r--r--hershey.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/hershey.go b/hershey.go
index d886f33..1cf2904 100644
--- a/hershey.go
+++ b/hershey.go
@@ -10,8 +10,7 @@ import (
"strings"
)
-type Point image.Point
-type Path []Point
+type Path []image.Point
type Set []Path
type Glyph struct {
@@ -43,11 +42,8 @@ func parseData(s string) Set {
}
var ph Path
for n := 0; n < len(el); n += 2 {
- p := Point{
- X: parsePoint(el[n+1]),
- Y: parsePoint(el[n]),
- }
- ph = append(ph, p)
+ x, y := parsePoint(el[n+1]), parsePoint(el[n])
+ ph = append(ph, image.Pt(x, y))
}
st = append(st, ph)
}
@@ -82,10 +78,6 @@ func loadFont(fname string) Font {
return fnt
}
-func (p Point) String() string {
- return fmt.Sprintf("%v,%v,", p.X, p.Y)
-}
-
func (p Path) String() (s string) {
//s = fmt.Sprint("Y0,", p[0])
s = fmt.Sprint("M", p[0], "D")