From 500caaeda74dd9c660279036293f4b2997cf0b03 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 9 Sep 2017 09:42:37 +0200 Subject: Add vendor --- .../llgcode/draw2d/draw2dkit/draw2dkit_test.go | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 vendor/github.com/llgcode/draw2d/draw2dkit/draw2dkit_test.go (limited to 'vendor/github.com/llgcode/draw2d/draw2dkit/draw2dkit_test.go') diff --git a/vendor/github.com/llgcode/draw2d/draw2dkit/draw2dkit_test.go b/vendor/github.com/llgcode/draw2d/draw2dkit/draw2dkit_test.go new file mode 100644 index 0000000..09eb0e4 --- /dev/null +++ b/vendor/github.com/llgcode/draw2d/draw2dkit/draw2dkit_test.go @@ -0,0 +1,29 @@ +package draw2dkit + +import ( + "image" + "image/color" + "testing" + + "github.com/llgcode/draw2d/draw2dimg" +) + +func TestCircle(t *testing.T) { + width := 200 + height := 200 + img := image.NewRGBA(image.Rect(0, 0, width, height)) + gc := draw2dimg.NewGraphicContext(img) + + gc.SetStrokeColor(color.NRGBA{255, 255, 255, 255}) + gc.SetFillColor(color.NRGBA{255, 255, 255, 255}) + gc.Clear() + + gc.SetStrokeColor(color.NRGBA{255, 0, 0, 255}) + gc.SetLineWidth(1) + + // Draw a circle + Circle(gc, 100, 100, 50) + gc.Stroke() + + draw2dimg.SaveToPngFile("../output/draw2dkit/TestCircle.png", img) +} -- cgit v1.2.3