painter

package
v0.0.0-...-c730260 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bounce

type Bounce struct {
	ColorStart color.Color
	ColorEnd   color.Color
	Up         *bool
	Shifter    common.Shifter
}

Bounce is a Painter which provides produces colors bouncing between ColorStart and ColorEnd, starting at p.ColorStart and shifting in the direction specified by Up

func (Bounce) Copy

func (p Bounce) Copy() common.Painter

Copy returns a deep copy of the Painter

func (*Bounce) GetStabilizeFuncs

func (p *Bounce) GetStabilizeFuncs() []func(p common.Palette)

GetStabilizeFuncs returns StabilizeFunc for all remaining unstablaized traits

func (Bounce) Paint

func (p Bounce) Paint(t time.Time, obj common.Renderable)

Paint returns a color based on t and obj

func (Bounce) String

func (p Bounce) String() string

String returns a string representation of the Painter

type Move

type Move struct {
	ColorStart color.Color
	HueShifter common.Shifter
}

Move is a Painter which provides shifting colors starting at colorStart

func (Move) Copy

func (p Move) Copy() common.Painter

Copy returns a deep copy of the Painter

func (*Move) GetStabilizeFuncs

func (p *Move) GetStabilizeFuncs() []func(p common.Palette)

GetStabilizeFuncs returns StabilizeFunc for all remaining unstablaized traits

func (Move) Paint

func (p Move) Paint(t time.Time, obj common.Renderable)

Paint returns a color based on t and obj

func (Move) String

func (p Move) String() string

String returns a string representation of the Painter

type Static

type Static struct {
	Color color.Color
}

Static is a Painter which provides unchanging colors

func (Static) Copy

func (p Static) Copy() common.Painter

Copy returns a deep copy of the Painter

func (*Static) GetStabilizeFuncs

func (p *Static) GetStabilizeFuncs() []func(p common.Palette)

GetStabilizeFuncs returns StabilizeFunc for all remaining unstablaized traits

func (Static) Paint

func (p Static) Paint(t time.Time, obj common.Renderable)

Paint returns a color based on t

func (Static) String

func (p Static) String() string

String returns a string representation of the Painter

Jump to

Keyboard shortcuts

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