Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
Area is a screen rectangle: an origin Point and a Size
func (Area) Center ¶
Center returns the origin Point that centers inner within a, clamped so the origin never precedes a's own origin when inner is larger
func (Area) Inset ¶
Inset returns a shrunk toward its center by by.Width on the left and right and by.Height on the top and bottom, with the Size clamped to zero
func (Area) Intersects ¶
Intersects reports whether a and b overlap in at least one cell
type Size ¶
type Size struct {
Width, Height int
}
Size is a pixel or cell extent, named so a call site never has to guess the order a bare (int, int) would leave ambiguous
func (Size) Clamp ¶
Clamp returns p pinned to the last valid cell of the Size, i.e. into the range [0, Width-1] x [0, Height-1]
Click to show internal directories.
Click to hide internal directories.