MCPcopy Index your code
hub / github.com/g3n/engine / DrawText

Method DrawText

text/font.go:263–266  ·  view source on GitHub ↗

DrawText draws text at the specified position (in pixels) of this canvas, using the specified font. The supplied text string can contain line break escape sequences (\n).

(x, y int, text string, f *Font)

Source from the content-addressed store, hash-verified

261// of this canvas, using the specified font.
262// The supplied text string can contain line break escape sequences (\n).
263func (c Canvas) DrawText(x, y int, text string, f *Font) {
264
265 f.DrawTextOnImage(text, x, y, c.RGBA)
266}
267
268// DrawTextCaret draws text at the specified position (in pixels)
269// of this canvas, using the specified font, and also a caret at

Callers 1

NewAtlasFunction · 0.95

Calls 1

DrawTextOnImageMethod · 0.80

Tested by

no test coverage detected