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(name string) Shade
Shade.from returns the shade called name.
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() Sides
zero returns a Sides value with no flags set.
enum Fill {
none
solid
}
Fill is how a shape is filled.
enum Shade {
light
dark
}
Shade has its own from, which replaces the generated one.
enum Sides {
top
right
bottom
left
}
Sides are the sides of a shape that have a border.
fn (e &Sides) is_empty() bool
is_empty returns true if no flags are set.
fn (e &Sides) has(flag Sides) bool
has returns true if any of the flags in flag are set.
fn (e &Sides) all(flag Sides) bool
all returns true if all the flags in flag are set.
fn (mut e Sides) set(flag Sides)
set sets the flags in flag.
fn (mut e Sides) set_all()
set_all sets all the flags.
fn (mut e Sides) clear(flag Sides)
clear clears the flags in flag.
fn (mut e Sides) clear_all()
clear_all clears all the flags.
fn (mut e Sides) toggle(flag Sides)
toggle flips the flags in flag.