Documentation ¶
Overview ¶
Package text provides functions for rendering basicfont.Face fonts to a an image.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Draw ¶
func Draw(dst draw.Image, text string, col color.Color, fnt *basicfont.Face, dx, dy float64, words bool)
Draw draws the provided text to the destination in the provided color. Relative position of the text is specified by dx and dy which must be in the range [0, 1]. If words is true, text spanning lines will be broken at word boundaries where possible.
func KeepAspectRatio ¶
KeepAspectRatio returns a draw rectangle that can be used in a call to a draw.Scaler to maintain the src aspect ratio in the dst image.
draw.BiLinear.Scale(dst, KeepAspectRatio(dst, src), src, src.Bounds(), op, opts)
Types ¶
type Outlined ¶
Outlined is an image that renders a single pixel width outline around a drawing.
func (Outlined[T]) ColorModel ¶
Click to show internal directories.
Click to hide internal directories.