aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-04-23 02:00:02 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-04-23 02:00:02 +0200
commit5cccd9dd5befd33d643d08fea3598ff6df81a8bf (patch)
treea79cd6c3bccb75c5a5a22abd8cf513cfbf450f93
parent3cb50e86ab3fcbbef32e8f524797a390e3377e34 (diff)
Add page
-rw-r--r--cutter.go6
-rw-r--r--main.go3
-rw-r--r--page.go10
3 files changed, 16 insertions, 3 deletions
diff --git a/cutter.go b/cutter.go
index cffe0c6..5a3507c 100644
--- a/cutter.go
+++ b/cutter.go
@@ -192,14 +192,14 @@ func (c Cutter) Bezier(a int, p0, p1, p2, p3 Point) {
fmt.Fprintf(c, "BZ%v,%v,%v,%v,%v", a, p0, p1, p2, p3)
}
-type Page int
+type Orientation int
const (
- Portrait Page = iota
+ Portrait Orientation = iota
Landscape
)
-func (c Cutter) Orientation(l Page) {
+func (c Cutter) Orientation(l Orientation) {
defer c.EOT()
fmt.Fprint(c, "FN", l)
}
diff --git a/main.go b/main.go
index 09b8153..9c93f5e 100644
--- a/main.go
+++ b/main.go
@@ -34,10 +34,13 @@ func main() {
defer cu.Home()
defer cu.LineType(Solid)
+ /*
for i := 0; i < 9; i++ {
cu.LineType(LineStyle(i))
cu.Move(Point{100 * i, 0})
cu.Draw(Point{100 * i, 1000})
}
+ */
+ cu.TestCut()
}
diff --git a/page.go b/page.go
new file mode 100644
index 0000000..88fa3ca
--- /dev/null
+++ b/page.go
@@ -0,0 +1,10 @@
+package main
+
+type Page struct {
+ Acceleration int
+ Dimension Point
+ MediaType int
+ Orientation Orientation
+ Origin Point
+ Speed int
+}