// Dash draws a line with a dash pattern func Dash(gc draw2d.GraphicContext, x, y, width, height float64) { sx, sy := width/162, height/205 gc.SetStrokeColor(image.Black) gc.SetLineDash([]float64{height / 10, height / 50, height / 50, height / 50}, -50.0) gc.SetLineCap(draw2d.ButtCap) gc.SetLineJoin(draw2d.RoundJoin) gc.SetLineWidth(height / 50) gc.MoveTo(x+sx*60.0, y) gc.LineTo(x+sx*60.0, y) gc.LineTo(x+sx*162, y+sy*205) rLineTo(gc, sx*-102.4, 0) gc.CubicCurveTo(x+sx*-17, y+sy*205, x+sx*-17, y+sy*103, x+sx*60.0, y+sy*103.0) gc.Stroke() gc.SetLineDash(nil, 0.0) }