direction

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Directions = []string{
	"NW", "N", "NE", "E", "SE", "S", "SW", "W", "Center",
}

Functions

This section is empty.

Types

type Direction

type Direction uint8
const (
	NW Direction = iota
	N
	NE
	E
	SE
	S
	SW
	W
	Center
)

func (Direction) Fn added in v0.0.1

Fn lays out a widget according to the direction. The widget is called with the context constraints minimum cleared.

func (Direction) Position

func (d Direction) Position(widget, bounds image.Point) image.Point

Position calculates widget position according to the direction.

func (Direction) String

func (d Direction) String() string

String returns the name of the direction in string form

Jump to

Keyboard shortcuts

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