MCPcopy
hub / github.com/tdewolff/canvas / ScaleDash

Function ScaleDash

canvas.go:158–164  ·  view source on GitHub ↗
(scale float64, offset float64, d []float64)

Source from the content-addressed store, hash-verified

156)
157
158func ScaleDash(scale float64, offset float64, d []float64) (float64, []float64) {
159 d2 := make([]float64, len(d))
160 for i := range d {
161 d2[i] = d[i] * scale
162 }
163 return offset * scale, d2
164}
165
166// Style is the path style that defines how to draw the path. When Fill is not set it will not fill the path. If StrokeColor is transparent or StrokeWidth is zero, it will not stroke the path. If Dashes is an empty array, it will not draw dashes but instead a solid stroke line. FillRule determines how to fill the path when paths overlap and have certain directions (clockwise, counter clockwise).
167type Style struct {

Callers 7

RenderPathMethod · 0.92
RenderPathMethod · 0.92
RenderPathMethod · 0.92
RenderPathMethod · 0.92
RenderPathMethod · 0.92
RenderPathMethod · 0.92
RenderPathMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected