From 7be9bf7db367afe66387588f4bacd772ac0c2c05 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 3 Jan 2018 01:12:39 +0100 Subject: testpattern --- cmd/testpattern/main.go | 3 +-- testpattern.go | 39 --------------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/cmd/testpattern/main.go b/cmd/testpattern/main.go index 1bdae5c..c4ccc40 100644 --- a/cmd/testpattern/main.go +++ b/cmd/testpattern/main.go @@ -12,9 +12,8 @@ func main() { log.Fatal(err) } defer dev.Close() - defer dev.Home() dev.Initialize(robo.MediaPen, robo.Portrait) dev.UpperRight(robo.A4) - //dev.TestPattern(handle.Writer) + dev.TestPattern() } diff --git a/testpattern.go b/testpattern.go index 274ac0f..2751759 100644 --- a/testpattern.go +++ b/testpattern.go @@ -1,44 +1,5 @@ -// +build ignore - package robo -import "bufio" - -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) -} - func (r Robo) TestPattern() { r.Factor(100, 100, 100) r.Offset(Point{0, 0}) -- cgit v1.2.3