From 91d3472be75004b6e937cd57ad27a8a6f6872b09 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 4 May 2015 23:19:46 +0200 Subject: More functions --- misc.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'misc.go') diff --git a/misc.go b/misc.go index 6ea5aa9..5934211 100644 --- a/misc.go +++ b/misc.go @@ -1,5 +1,7 @@ package main +import "log" + func (c Cutter) DrawAtom() { base := Point{2000, 2000} for i := 0; i < 3; i++ { @@ -26,3 +28,18 @@ func (c Cutter) DrawCircles() { Polar{100 * float64(i), 3600}) } } + +func (c Cutter) DrawPic() { + for _, path := range parsePage() { + c.Move(path[0]) + for _, p := range path[1:] { + c.Draw(p) + } + } +} + +func (c Cutter) MustMarks(p Point) { + if !c.SearchMarks(p, 400) { + log.Fatal("marks not found") + } +} -- cgit v1.2.3