FillString implements the vg.Canvas.FillString method.
(f font.Face, pt vg.Point, text string)
| 173 | |
| 174 | // FillString implements the vg.Canvas.FillString method. |
| 175 | func (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 |