From 99f1fece69aa19a9f40779874e9bf0310aa8bdf5 Mon Sep 17 00:00:00 2001 From: Stani Date: Sat, 11 Jul 2015 18:58:28 +0200 Subject: [PATCH] implement SetLineDash for draw2dpdf --- draw2dpdf/gc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/draw2dpdf/gc.go b/draw2dpdf/gc.go index fd9563a..2eb5ed8 100644 --- a/draw2dpdf/gc.go +++ b/draw2dpdf/gc.go @@ -261,6 +261,12 @@ func (gc *GraphicContext) SetFontSize(fontSize float64) { gc.pdf.SetFontSize(fontSize * gc.Current.Scale) } +// SetLineDash sets the line dash pattern +func (gc *GraphicContext) SetLineDash(Dash []float64, DashOffset float64) { + gc.StackGraphicContext.SetLineDash(Dash, DashOffset) + gc.pdf.SetDashPattern(Dash, DashOffset) +} + // SetLineWidth sets the line width func (gc *GraphicContext) SetLineWidth(LineWidth float64) { gc.StackGraphicContext.SetLineWidth(LineWidth)