aboutsummaryrefslogtreecommitdiff
path: root/pic.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-07 13:53:37 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-07 13:53:37 +0200
commita7af7e8276e7854093ee5d31d712c49a78f2aa09 (patch)
tree6982b5c1be88e937e2f998126a1a07395acecce9 /pic.go
parent538a0179d173b3c74649057c026896e399a913c7 (diff)
KISS
Diffstat (limited to 'pic.go')
-rw-r--r--pic.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pic.go b/pic.go
index da8129d..ff4e5f3 100644
--- a/pic.go
+++ b/pic.go
@@ -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)
}
}
}