align

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Align

type Align int
const (
	Center      Align = 0
	Left        Align = 1
	Right       Align = 2
	Top         Align = 4
	Bottom      Align = 8
	TopLeft     Align = Top | Left
	TopRight    Align = Top | Right
	BottomLeft  Align = Bottom | Left
	BottomRight Align = Bottom | Right
)

func (Align) LineInt

func (a Align) LineInt(x, w int) int

LineInt returns left coordinate of the line aligned to the point (both horizontal and vertical constants work).

func (Align) RectInt

func (a Align) RectInt(x, y, w, h int) (nx, ny int)

RectInt returns top-left coordinates of the rectangle with size (w, h) aligned to the point (x, y).

Jump to

Keyboard shortcuts

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