diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-07 13:53:37 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2015-05-07 13:53:37 +0200 |
commit | a7af7e8276e7854093ee5d31d712c49a78f2aa09 (patch) | |
tree | 6982b5c1be88e937e2f998126a1a07395acecce9 /pic.go | |
parent | 538a0179d173b3c74649057c026896e399a913c7 (diff) |
KISS
Diffstat (limited to 'pic.go')
-rw-r--r-- | pic.go | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -14,7 +14,7 @@ func parseLine(s string) (pa Path) { if strings.HasPrefix(s, "line from ") { for _, p := range strings.Split(s[10:], " to ") { var po Point - fmt.Sscanf(p, "%v,%v", &po.Y, &po.X) + fmt.Sscanf(p, "%v,%v", &po.X, &po.Y) po.X = po.X * IN po.Y = po.Y * IN pa = append(pa, po) @@ -36,11 +36,12 @@ func parsePage() (pa Page) { return pa } -func (c Cutter) DrawPic(cor Point) { +func (c Cutter) DrawPic() { + c.Orientation(Landscape) for _, path := range parsePage() { - c.Move(cor.Sub(path[0])) + c.Move(path[0]) for _, p := range path[1:] { - c.Draw(cor.Sub(p)) + c.Draw(p) } } } |