aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go2
-rw-r--r--pic.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index 71fe893..9b7c75f 100644
--- a/main.go
+++ b/main.go
@@ -41,6 +41,6 @@ func main() {
//fmt.Println("Call Gin", c.CallGin())
//c.MustMarks(Point{19 * CM, 18 * CM})
- c.DrawPic()
+ c.DrawPic(Point{-11 * IN, 0})
}
diff --git a/pic.go b/pic.go
index d16e6e1..bee5745 100644
--- a/pic.go
+++ b/pic.go
@@ -19,7 +19,7 @@ func parseLine(s string) (pa Path) {
for _, p := range strings.Split(s[10:], " to ") {
var po Point
fmt.Sscanf(p, "%v,%v", &po.Y, &po.X)
- po.X = truncate(11*IN - po.X*IN)
+ po.X = truncate(po.X * IN)
po.Y = truncate(po.Y * IN)
pa = append(pa, po)
}
@@ -40,11 +40,11 @@ func parsePage() (pa Page) {
return pa
}
-func (c Cutter) DrawPic() {
+func (c Cutter) DrawPic(cor Point) {
for _, path := range parsePage() {
- c.Move(path[0])
+ c.Move(path[0].Add(cor))
for _, p := range path[1:] {
- c.Draw(p)
+ c.Draw(p.Add(cor))
}
}
}