Documentation ¶
Overview ¶
Package alignfor provides functions that align elements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Rectangle ¶
func Rectangle(rect image.Rectangle, ar image.Rectangle, h align.Horizontal, v align.Vertical) (image.Rectangle, error)
Rectangle aligns the area within the rectangle returning the aligned area. The area must fall within the rectangle.
func Text ¶
func Text(rect image.Rectangle, text string, h align.Horizontal, v align.Vertical) (image.Point, error)
Text aligns the text within the given rectangle, returns the start point for the text. For the purposes of the alignment this assumes that text will be trimmed if it overruns the rectangle. This only supports a single line of text, the text must not contain non-printable characters, allows empty text.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.