MCPcopy Index your code
hub / github.com/gonum/plot / FillString

Method FillString

vg/vgtex/canvas.go:175–181  ·  view source on GitHub ↗

FillString implements the vg.Canvas.FillString method.

(f font.Face, pt vg.Point, text string)

Source from the content-addressed store, hash-verified

173
174// FillString implements the vg.Canvas.FillString method.
175func (c *Canvas) FillString(f font.Face, pt vg.Point, text string) {
176 c.Push()
177 c.wcolor()
178 pt.X += 0.5 * f.Width(text)
179 c.wtex(`\pgftext[base,at={\pgfpoint{%gpt}{%gpt}}]{{\fontsize{%gpt}{%gpt}\selectfont %s}}`, pt.X, pt.Y, f.Font.Size, f.Font.Size, text)
180 c.Pop()
181}
182
183// DrawImage implements the vg.Canvas.DrawImage method.
184// DrawImage will first save the image inside a PNG file and have the

Callers

nothing calls this directly

Implementers 7

teeCanvasvg/tee.go
Canvasvg/vgeps/vgeps.go
Canvasvg/vgtex/canvas.go
Canvasvg/vgimg/vgimg.go
Canvasvg/vgpdf/vgpdf.go
Canvasvg/recorder/recorder.go
Canvasvg/vgsvg/vgsvg.go

Calls 5

PushMethod · 0.95
wcolorMethod · 0.95
wtexMethod · 0.95
PopMethod · 0.95
WidthMethod · 0.45

Tested by

no test coverage detected