aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-12 20:03:55 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-12 20:03:55 +0200
commitcf79b796e59bbd8f45824ab164c751e753967f10 (patch)
tree556b4a4c1dbefa870064dbe7359496b20e3e9525
parent80507f9418805e886a1ea0ab6e61fb247fb2330c (diff)
Add custom lines
-rw-r--r--cutter.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/cutter.go b/cutter.go
index 50f544c..4a5b2c1 100644
--- a/cutter.go
+++ b/cutter.go
@@ -174,7 +174,10 @@ const (
DashLongDot
DashDoubleDot
DashLongDoubleDot
- Custom1 // 2 args ? --a-- b --a--
+)
+
+const (
+ Custom1 LineStyle = iota + 100 // 2 args ? --a-- b --a--
Custom2 // 3 args ? --a-- b -c- b -c- b --a--
Custom3 // 3 args ? --a-- b -c- b --a--
)
@@ -183,6 +186,10 @@ func (c Cutter) LineType(n LineStyle) {
c.Send("L", n)
}
+func (c Cutter) LineTypeCustom(down, up Unit) {
+ c.Send("L100,1", down, ",", up)
+}
+
func (c Cutter) LineScale(n int) {
c.Send("B", n)
}