MCPcopy Index your code
hub / github.com/tdewolff/canvas / RenderTo

Method RenderTo

text.go:1251–1255  ·  view source on GitHub ↗

RenderTo renders the text and its decorations converted to paths, calling r.RenderPath on the renderer. Note that text lines are drawn downwards starting at the origin, that is along negative Y. The origin is thus the top-left corner of the text box.

(r Renderer, m Matrix, resolution Resolution)

Source from the content-addressed store, hash-verified

1249
1250// RenderTo renders the text and its decorations converted to paths, calling r.RenderPath on the renderer. Note that text lines are drawn downwards starting at the origin, that is along negative Y. The origin is thus the top-left corner of the text box.
1251func (t *Text) RenderTo(r Renderer, m Matrix, resolution Resolution) {
1252 for index := range t.lines {
1253 t.renderLineTo(r, m, resolution, index, true, true)
1254 }
1255}
1256
1257func (t *Text) renderLineTo(r Renderer, m Matrix, resolution Resolution, index int, renderText, renderDeco bool) {
1258 line := t.lines[index]

Callers 2

OutlineBoundsMethod · 0.95
RenderAsPathMethod · 0.95

Calls 1

renderLineToMethod · 0.95

Tested by

no test coverage detected