axis

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

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

const (
	Horizontal Axis = iota
	Vertical
)

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

func (a Axis) Convert(pt image.Point) image.Point

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

func (Axis) String

func (a Axis) String() string

Jump to

Keyboard shortcuts

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