From 5df1705bb4cdeed8324421e5964bde98866762cc Mon Sep 17 00:00:00 2001 From: Laurent Le Goff Date: Thu, 23 Apr 2015 17:14:16 +0200 Subject: [PATCH] Remove LineNoMarker --- dasher.go | 1 - line.go | 3 +-- stroker.go | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/dasher.go b/dasher.go index ea122ec..ac70396 100644 --- a/dasher.go +++ b/dasher.go @@ -27,7 +27,6 @@ func (dasher *DashVertexConverter) NextCommand(cmd LineMarker) { func (dasher *DashVertexConverter) LineTo(x, y float64) { dasher.lineTo(x, y) - dasher.command = LineNoneMarker } func (dasher *DashVertexConverter) MoveTo(x, y float64) { diff --git a/line.go b/line.go index ff1be5d..b6b6c47 100644 --- a/line.go +++ b/line.go @@ -6,9 +6,8 @@ package draw2d type LineMarker byte const ( - LineNoneMarker LineMarker = iota // Mark the current point of the line as a join to it can draw some specific join Bevel, Miter, Rount - LineJoinMarker + LineJoinMarker LineMarker = iota ) type LineBuilder interface { diff --git a/stroker.go b/stroker.go index 462c9b7..b666143 100644 --- a/stroker.go +++ b/stroker.go @@ -38,7 +38,6 @@ func NewLineStroker(c Cap, j Join, converter LineBuilder) *LineStroker { l.rewind = make([]float64, 0, 256) l.Cap = c l.Join = j - l.command = LineNoneMarker return l } @@ -51,15 +50,12 @@ func (l *LineStroker) End() { l.Next.MoveTo(l.vertices[0], l.vertices[1]) for i, j := 2, 3; j < len(l.vertices); i, j = i+2, j+2 { l.Next.LineTo(l.vertices[i], l.vertices[j]) - l.Next.NextCommand(LineNoneMarker) } } for i, j := len(l.rewind)-2, len(l.rewind)-1; j > 0; i, j = i-2, j-2 { - l.Next.NextCommand(LineNoneMarker) l.Next.LineTo(l.rewind[i], l.rewind[j]) } if len(l.vertices) > 1 { - l.Next.NextCommand(LineNoneMarker) l.Next.LineTo(l.vertices[0], l.vertices[1]) } l.Next.End() @@ -85,7 +81,6 @@ func (l *LineStroker) LineTo(x, y float64) { default: l.line(l.x, l.y, x, y) } - l.command = LineNoneMarker } func (l *LineStroker) Close() {