From d04f4103d2887a6b3c8e7cc60386cdc94c8cc92d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 29 Jul 2019 19:17:36 +0200 Subject: switch to image.Point --- hershey.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hershey.go b/hershey.go index bfe31fb..d886f33 100644 --- a/hershey.go +++ b/hershey.go @@ -3,16 +3,14 @@ package main import ( "bufio" "fmt" + "image" "log" "os" "strconv" "strings" ) -type Point struct { - X, Y int -} - +type Point image.Point type Path []Point type Set []Path @@ -46,8 +44,8 @@ func parseData(s string) Set { var ph Path for n := 0; n < len(el); n += 2 { p := Point{ - Y: parsePoint(el[n]), X: parsePoint(el[n+1]), + Y: parsePoint(el[n]), } ph = append(ph, p) } -- cgit v1.2.3