aboutsummaryrefslogtreecommitdiff
path: root/robo.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-16 13:19:33 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-16 13:19:33 +0200
commit3174484955c7c053eebba47c7562fcb4156c8c46 (patch)
tree80d0489e050c1eca0f824c7d6ebe1ff8e8739cd2 /robo.go
parentafd8bc4179772bd683b09c9bb27fbe9583c4849a (diff)
Line method
Diffstat (limited to 'robo.go')
-rw-r--r--robo.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/robo.go b/robo.go
index 0e4e758..d2ca8a7 100644
--- a/robo.go
+++ b/robo.go
@@ -61,6 +61,11 @@ func (ph Path) Circle3P(c *bufio.Writer) { ph[0:3].send(c, "WP") }
func (ph Path) CircleRelative(c *bufio.Writer) { ph[0:2].send(c, "]") }
func (ph Path) Ellipse(c *bufio.Writer) { ph[0:4].send(c, ")") }
+func (ph Path) Line(c *bufio.Writer) {
+ ph[0].Move(c)
+ ph[1:].Draw(c)
+}
+
func (u Unit) send(c *bufio.Writer, a ...interface{}) {
fmt.Fprint(c, a[0], u)
for _, arg := range a[1:] {