From 781a0defe5066768ac26705897251183c299e6f2 Mon Sep 17 00:00:00 2001 From: Stani Date: Sat, 11 Jul 2015 01:13:39 +0200 Subject: [PATCH] previous fix makes Save and Restore for line caps join unnecessary --- samples/linecapjoin/linecapjoin.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/linecapjoin/linecapjoin.go b/samples/linecapjoin/linecapjoin.go index 6acf659..81d78f0 100644 --- a/samples/linecapjoin/linecapjoin.go +++ b/samples/linecapjoin/linecapjoin.go @@ -31,7 +31,6 @@ func Main(gc draw2d.GraphicContext, ext string) (string, error) { // Draw a line with an angle with specified line cap and join func Draw(gc draw2d.GraphicContext, cap draw2d.Cap, join draw2d.Join, x0, y0, x1, y1, offset float64) { - gc.Save() // pdf: save & restore needed to isolate caps and joins gc.SetLineCap(cap) gc.SetLineJoin(join) @@ -50,5 +49,4 @@ func Draw(gc draw2d.GraphicContext, cap draw2d.Cap, join draw2d.Join, gc.LineTo((x0+x1)/2+offset, (y0+y1)/2) gc.LineTo(x1, y1) gc.Stroke() - gc.Restore() }