From 1dedee85db57989f5c3b4d37fc0d892104f9f88d Mon Sep 17 00:00:00 2001 From: "legoff.laurent" Date: Mon, 6 Dec 2010 21:07:20 +0000 Subject: [PATCH] change decomposition algorithm --- draw2d/src/pkg/draw2d/draw2d.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/draw2d/src/pkg/draw2d/draw2d.go b/draw2d/src/pkg/draw2d/draw2d.go index d2b6da2..be44947 100644 --- a/draw2d/src/pkg/draw2d/draw2d.go +++ b/draw2d/src/pkg/draw2d/draw2d.go @@ -273,8 +273,8 @@ func (gc *GraphicContext) paint(rasterizer *raster.Rasterizer, color image.Color gc.current.path = new(PathStorage) } -/**** first method ****/ -func (gc *GraphicContext) Stroke(paths ...*PathStorage) { +/**** First method ****/ +func (gc *GraphicContext) Stroke2(paths ...*PathStorage) { paths = append(paths, gc.current.path) gc.strokeRasterizer.UseNonZeroWinding = true @@ -298,7 +298,7 @@ func (gc *GraphicContext) Stroke(paths ...*PathStorage) { } /**** second method ****/ -func (gc *GraphicContext) Stroke2(paths ...*PathStorage) { +func (gc *GraphicContext) Stroke(paths ...*PathStorage) { paths = append(paths, gc.current.path) gc.strokeRasterizer.UseNonZeroWinding = true @@ -318,7 +318,7 @@ func (gc *GraphicContext) Stroke2(paths ...*PathStorage) { } /**** first method ****/ -func (gc *GraphicContext) Fill(paths ...*PathStorage) { +func (gc *GraphicContext) Fill2(paths ...*PathStorage) { paths = append(paths, gc.current.path) gc.fillRasterizer.UseNonZeroWinding = gc.current.fillRule.fillRule() @@ -329,7 +329,7 @@ func (gc *GraphicContext) Fill(paths ...*PathStorage) { } /**** second method ****/ -func (gc *GraphicContext) Fill2(paths ...*PathStorage) { +func (gc *GraphicContext) Fill(paths ...*PathStorage) { paths = append(paths, gc.current.path) gc.fillRasterizer.UseNonZeroWinding = gc.current.fillRule.fillRule() @@ -340,7 +340,7 @@ func (gc *GraphicContext) Fill2(paths ...*PathStorage) { gc.paint(gc.fillRasterizer, gc.current.fillColor) } -func (gc *GraphicContext) FillStroke(paths ...*PathStorage) { +func (gc *GraphicContext) FillStroke2(paths ...*PathStorage) { paths = append(paths, gc.current.path) gc.fillRasterizer.UseNonZeroWinding = gc.current.fillRule.fillRule() gc.strokeRasterizer.UseNonZeroWinding = true @@ -363,7 +363,7 @@ func (gc *GraphicContext) FillStroke(paths ...*PathStorage) { } /* second method */ -func (gc *GraphicContext) FillStroke2(paths ...*PathStorage) { +func (gc *GraphicContext) FillStroke(paths ...*PathStorage) { gc.fillRasterizer.UseNonZeroWinding = gc.current.fillRule.fillRule() gc.strokeRasterizer.UseNonZeroWinding = true