From 8b0d5d50488d48de5ef2ece0a920ffff0984578f Mon Sep 17 00:00:00 2001 From: Laurent Le Goff Date: Fri, 17 Apr 2015 17:03:50 +0200 Subject: [PATCH] Clean --- draw2d/curve/_testmain.go | 41 --------------------------------------- draw2dgl/gc.go | 14 ------------- 2 files changed, 55 deletions(-) delete mode 100644 draw2d/curve/_testmain.go diff --git a/draw2d/curve/_testmain.go b/draw2d/curve/_testmain.go deleted file mode 100644 index a1d1381..0000000 --- a/draw2d/curve/_testmain.go +++ /dev/null @@ -1,41 +0,0 @@ -package main - -import "github.com/llgcode/draw2d/draw2d/curve" -import "testing" -import __os__ "os" -import __regexp__ "regexp" - -var tests = []testing.InternalTest{ - {"curve.TestCubicCurveRec", curve.TestCubicCurveRec}, - {"curve.TestCubicCurve", curve.TestCubicCurve}, - {"curve.TestCubicCurveAdaptiveRec", curve.TestCubicCurveAdaptiveRec}, - {"curve.TestCubicCurveAdaptive", curve.TestCubicCurveAdaptive}, - {"curve.TestCubicCurveParabolic", curve.TestCubicCurveParabolic}, - {"curve.TestQuadCurve", curve.TestQuadCurve}, -} - -var benchmarks = []testing.InternalBenchmark{{"curve.BenchmarkCubicCurveRec", curve.BenchmarkCubicCurveRec}, - {"curve.BenchmarkCubicCurve", curve.BenchmarkCubicCurve}, - {"curve.BenchmarkCubicCurveAdaptiveRec", curve.BenchmarkCubicCurveAdaptiveRec}, - {"curve.BenchmarkCubicCurveAdaptive", curve.BenchmarkCubicCurveAdaptive}, - {"curve.BenchmarkCubicCurveParabolic", curve.BenchmarkCubicCurveParabolic}, - {"curve.BenchmarkQuadCurve", curve.BenchmarkQuadCurve}, -} - -var matchPat string -var matchRe *__regexp__.Regexp - -func matchString(pat, str string) (result bool, err __os__.Error) { - if matchRe == nil || matchPat != pat { - matchPat = pat - matchRe, err = __regexp__.Compile(matchPat) - if err != nil { - return - } - } - return matchRe.MatchString(str), nil -} - -func main() { - testing.Main(matchString, tests, benchmarks) -} diff --git a/draw2dgl/gc.go b/draw2dgl/gc.go index 7de60f2..0dca03e 100644 --- a/draw2dgl/gc.go +++ b/draw2dgl/gc.go @@ -214,20 +214,6 @@ func (gc *GraphicContext) Fill(paths ...*draw2d.PathStorage) { gc.Current.Path.Clear() } -/* -func (gc *GraphicContext) Fill(paths ...*draw2d.PathStorage) { - paths = append(paths, gc.Current.Path) - gc.fillRasterizer.UseNonZeroWinding = gc.Current.FillRule.UseNonZeroWinding() - - pathConverter := draw2d.NewPathAdder(draw2d.NewMatrixTransformAdder(gc.Current.Tr, gc.fillRasterizer)) - pathConverter.ApproximationScale = gc.Current.Tr.GetScale() - pathConverter.Convert(paths...) - - gc.paint(gc.fillRasterizer, gc.Current.FillColor) - gc.Current.Path.Clear() -} -*/ - func (gc *GraphicContext) FillStroke(paths ...*draw2d.PathStorage) { gc.fillRasterizer.UseNonZeroWinding = gc.Current.FillRule.UseNonZeroWinding() gc.strokeRasterizer.UseNonZeroWinding = true