alignfor

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package alignfor provides functions that align elements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rectangle

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL