aboutsummaryrefslogtreecommitdiff
path: root/testpattern.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-05-16 16:45:59 +0200
committerDimitri Sokolyuk <demon@dim13.org>2015-05-16 16:45:59 +0200
commitf71a721894aeec389c07a83187547af81a9ae3e2 (patch)
treed0b5d07f9893ee0e12c943dd6df596a66b2afea2 /testpattern.go
parent68fbf7e2dfcdeeb2f8cc6d6d0ef78ecfbea4fe41 (diff)
Update Test Pattern
Diffstat (limited to 'testpattern.go')
-rw-r--r--testpattern.go61
1 files changed, 34 insertions, 27 deletions
diff --git a/testpattern.go b/testpattern.go
index 58b4467..27e7593 100644
--- a/testpattern.go
+++ b/testpattern.go
@@ -1,31 +1,38 @@
package robo
-func (c Cutter) TestPattern() {
- c.Factor(Triple{100, 100, 100})
- c.Offset(Point{0, 0})
- c.WriteLowerLeft(Point{0, 0})
+import "bufio"
- c.Move(Point{510, 637})
- c.Bezier(1, Point{510, 637}, Point{439, 637},
- Point{383, 580}, Point{383, 510})
- c.Bezier(1, Point{383, 510}, Point{383, 439},
- Point{439, 383}, Point{510, 383})
- c.Bezier(1, Point{510, 383}, Point{580, 383},
- Point{637, 439}, Point{637, 510})
- c.Bezier(1, Point{637, 510}, Point{637, 580},
- Point{580, 637}, Point{510, 637})
-
- c.Move(Point{764, 764})
- c.Draw(Point{256, 764})
- c.Draw(Point{256, 256})
- c.Draw(Point{764, 256})
- c.Draw(Point{764, 764})
-
- c.Move(Point{2, 510})
- c.Draw(Point{1018, 510})
-
- c.Move(Point{510, 1018})
- c.Draw(Point{510, 2})
-
- c.Move(Point{0, 0})
+func TestPattern(c *bufio.Writer) {
+ Triple{100, 100, 100}.Factor(c)
+ Point{0, 0}.Offset(c)
+ Point{0, 0}.LowerLeft(c)
+ Point{510, 637}.Move(c)
+ Path{
+ Point{510, 637}, Point{439, 637},
+ Point{383, 580}, Point{383, 510},
+ }.Bezier(c, 1)
+ Path{
+ Point{383, 510}, Point{383, 439},
+ Point{439, 383}, Point{510, 383},
+ }.Bezier(c, 1)
+ Path{
+ Point{510, 383}, Point{580, 383},
+ Point{637, 439}, Point{637, 510},
+ }.Bezier(c, 1)
+ Path{
+ Point{637, 510}, Point{637, 580},
+ Point{580, 637}, Point{510, 637},
+ }.Bezier(c, 1)
+ Path{
+ Point{764, 764}, Point{256, 764},
+ Point{256, 256}, Point{764, 256},
+ Point{764, 764},
+ }.Line(c)
+ Path{
+ Point{2, 510}, Point{1018, 510},
+ }.Line(c)
+ Path{
+ Point{510, 1018}, Point{510, 2},
+ }.Line(c)
+ Point{0, 0}.Move(c)
}