aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-15 17:34:57 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-15 17:34:57 +0200
commit896b4a06f9de9904bea9faa0e6c6ba3d3970bc0a (patch)
tree527c45ce865e5109657118cc9bda1311dd0fab9b
parent6911bfcb8434edc9cc939c17e5a906185bbd0234 (diff)
Add circle functions
-rw-r--r--robo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/robo.go b/robo.go
index c8c3cb6..ab1bc6c 100644
--- a/robo.go
+++ b/robo.go
@@ -55,6 +55,12 @@ func (ph Path) DrawRelative(c *bufio.Writer) { ph.send(c, "E") }
func (ph Path) Curve(c *bufio.Writer, a int) { ph.send(c, "Y", a, ",") }
func (ph Path) CurveRelative(c *bufio.Writer, a int) { ph.send(c, "_", a, ",") }
+func (ph Path) Bezier(c *bufio.Writer, a int) { ph[0:4].send(c, "BZ", a, ",") }
+func (ph Path) Circle(c *bufio.Writer) { ph[0:3].send(c, "W") }
+func (ph Path) CircleRelative(c *bufio.Writer) { ph[0:2].send(c, "]") }
+func (ph Path) Circle3P(c *bufio.Writer) { ph[0:3].send(c, "]") }
+func (ph Path) Ellipse(c *bufio.Writer) { ph[0:4].send(c, "]") }
+
func (u Unit) send(c *bufio.Writer, a ...interface{}) {
fmt.Fprint(c, a[0], u)
for _, arg := range a[1:] {