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

Method RenderTo

patterns.go:130–133  ·  view source on GitHub ↗

RenderTo tiles the hatch pattern to the clipping path and renders it to the renderer.

(r Renderer, clip *Path)

Source from the content-addressed store, hash-verified

128
129// RenderTo tiles the hatch pattern to the clipping path and renders it to the renderer.
130func (p *HatchPattern) RenderTo(r Renderer, clip *Path) {
131 hatch := p.Tile(clip)
132 r.RenderPath(hatch, Style{Fill: p.Fill}, Identity)
133}
134
135// NewLineHatch returns a new line hatch pattern with lines at an angle with a spacing of distance. Thickness is the stroke thickness applied to the shape; stroking is ignored with thickness is zero.
136func NewLineHatch(ifill any, angle, distance, thickness float64) *HatchPattern {

Callers

nothing calls this directly

Calls 2

TileMethod · 0.95
RenderPathMethod · 0.65

Tested by

no test coverage detected