Documentation ¶
Index ¶
- type Axis
- func (a Axis) Constraints(mainMin, mainMax, crossMin, crossMax int) constraints.Constraints
- func (a Axis) Convert(pt image.Point) image.Point
- func (a Axis) CrossConstraint(cs constraints.Constraints) (int, int)
- func (a Axis) MainConstraint(cs constraints.Constraints) (int, int)
- func (a Axis) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Axis ¶
type Axis uint8
Axis defines the direction of a widget with multiple elements
func (Axis) Constraints ¶ added in v0.0.1
func (a Axis) Constraints(mainMin, mainMax, crossMin, crossMax int) constraints.Constraints
Constraints return the Constraints for axis a
func (Axis) Convert ¶
Convert a point in (x, y) coordinates to (main, cross) coordinates, or vice versa. Specifically, Convert((x, y)) returns (x, y) unchanged for the horizontal axis, or (y, x) for the vertical axis.
func (Axis) CrossConstraint ¶ added in v0.0.1
func (a Axis) CrossConstraint(cs constraints.Constraints) (int, int)
CrossConstraint returns the min and max cross Constraints for axis a
func (Axis) MainConstraint ¶ added in v0.0.1
func (a Axis) MainConstraint(cs constraints.Constraints) (int, int)
MainConstraint returns the min and max main Constraints for axis a
Click to show internal directories.
Click to hide internal directories.