tincture

package
v0.0.0-...-a30bc99 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tincture

type Tincture struct {
	Type            string
	Name            string
	Color           color.RGBA
	PatternFileName string
	Tags            []string
	Commonality     int
}

Tincture is a tincture

func All

func All() []Tincture

All returns all tinctures

func ByTag

func ByTag(tinctures []Tincture, tag string) []Tincture

ByTag returns all tinctures that have the specified tag

func Complementary

func Complementary(t Tincture, includeFurs bool) []Tincture

Complementary returns all tinctures that complement the given one

func Contrasting

func Contrasting(t Tincture, includeFurs bool) []Tincture

Contrasting returns all tinctures that contrast the given one

func ExcludeTag

func ExcludeTag(tinctures []Tincture, tag string) []Tincture

ExcludeTag returns all tinctures that don't have the specified tag

func Random

func Random(tinctures []Tincture) (Tincture, error)

Random returns a random tincture from the specified set

func RandomAll

func RandomAll() (Tincture, error)

RandomAll returns a random tincture

func RandomByTag

func RandomByTag(tag string) (Tincture, error)

RandomByTag returns a random tincture that has the specified tag

func RandomComplementary

func RandomComplementary(t Tincture, includeFurs bool) (Tincture, error)

RandomComplementary returns a random tincture that contrasts with the given one

func RandomContrasting

func RandomContrasting(t Tincture, includeFurs bool) (Tincture, error)

RandomContrasting returns a random tincture that contrasts with the given one

func RandomWeighted

func RandomWeighted(tinctures []Tincture) (Tincture, error)

RandomWeighted returns a random tincture based on its commonality from the specified set

func Remove

func Remove(tincture Tincture, tinctures []Tincture) []Tincture

Remove removes the given tincture from the given set

func (Tincture) Fill

func (tincture Tincture) Fill(dc *gg.Context) error

Fill passes a tincture to gg's Fill context operation

Jump to

Keyboard shortcuts

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