main

fn Fill.from #

fn Fill.from[W](input W) !Fill

from returns the Fill value of an integer or of a field name, or an error if there is none.

fn Shade.from #

fn Shade.from(name string) Shade

Shade.from returns the shade called name.

fn Sides.from #

fn Sides.from[W](input W) !Sides

from returns the Sides value of an integer or of a field name, or an error if there is none.

fn Sides.zero #

fn Sides.zero() Sides

zero returns a Sides value with no flags set.

enum Fill #

enum Fill {
	none
	solid
}

Fill is how a shape is filled.

enum Shade #

enum Shade {
	light
	dark
}

Shade has its own from, which replaces the generated one.

enum Sides #

@[flag]
enum Sides {
	top
	right
	bottom
	left
}

Sides are the sides of a shape that have a border.

fn (Sides) is_empty #

fn (e &Sides) is_empty() bool

is_empty returns true if no flags are set.

fn (Sides) has #

fn (e &Sides) has(flag Sides) bool

has returns true if any of the flags in flag are set.

fn (Sides) all #

fn (e &Sides) all(flag Sides) bool

all returns true if all the flags in flag are set.

fn (Sides) set #

fn (mut e Sides) set(flag Sides)

set sets the flags in flag.

fn (Sides) set_all #

fn (mut e Sides) set_all()

set_all sets all the flags.

fn (Sides) clear #

fn (mut e Sides) clear(flag Sides)

clear clears the flags in flag.

fn (Sides) clear_all #

fn (mut e Sides) clear_all()

clear_all clears all the flags.

fn (Sides) toggle #

fn (mut e Sides) toggle(flag Sides)

toggle flips the flags in flag.