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