From 5cccd9dd5befd33d643d08fea3598ff6df81a8bf Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 23 Apr 2015 02:00:02 +0200 Subject: Add page --- cutter.go | 6 +++--- main.go | 3 +++ page.go | 10 ++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 page.go 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 +} -- cgit v1.2.3