art

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdjustLevel added in v0.10.3

func AdjustLevel(baseColor color.Color, amount float64) (color.RGBA, error)

func Analogous added in v0.4.0

func Analogous(baseColor color.RGBA, degShift float64) (color.RGBA, color.RGBA, error)

func Complementary added in v0.4.0

func Complementary(baseColor color.RGBA) color.RGBA

func Darken

func Darken(baseColor color.Color, factor float64) color.RGBA

func Desaturate added in v0.4.0

func Desaturate(baseColor color.Color, amount float64) (color.RGBA, error)

func GetFactionBaseColor

func GetFactionBaseColor(factionID string) color.RGBA

func Lighten

func Lighten(baseColor color.RGBA, factor float64) color.RGBA

Types

type AngleMorph added in v0.12.0

type AngleMorph struct {
	RNG                               prng.Generator
	Width, Height                     float64
	X, Y                              float64
	MaxShiftFactorX, MaxShiftFactorY  *float64
	ColumnCount, RowCount             int
	InterpolationSteps                *int
	Color                             color.RGBA
	Gradient                          AngleMorphGradient
	ColorShiftMax                     *float64
	StrokeWidthMain, StrokeWidthMinor *float64
	TopRow, BottomRow                 []Point
	LeftColumn, RightColumn           []Point
}

func (*AngleMorph) Draw added in v0.12.0

func (drawer *AngleMorph) Draw(ctx *canvas.Context) error

type AngleMorphGradient added in v0.12.0

type AngleMorphGradient string
const (
	AngleMorphGradientVertical   AngleMorphGradient = "vertical"
	AngleMorphGradientHorizontal AngleMorphGradient = "horizontal"
	AngleMorphGradientBoth       AngleMorphGradient = "both"
	AngleMorphGradientNone       AngleMorphGradient = "none"
)

type Drawer

type Drawer interface {
	Draw(ctx *canvas.Context, card *nrdb.Printing) error
}

type DrawerFunc

type DrawerFunc func(ctx *canvas.Context, card *nrdb.Printing) error

func (DrawerFunc) Draw

func (df DrawerFunc) Draw(ctx *canvas.Context, card *nrdb.Printing) error

type NoopDrawer

type NoopDrawer struct {
}

func (NoopDrawer) Draw

func (NoopDrawer) Draw(_ *canvas.Context, _ *nrdb.Printing) error

type Point added in v0.12.0

type Point struct {
	// contains filtered or unexported fields
}

type TechRing added in v0.9.5

type TechRing struct {
	RNG                                        prng.Generator
	Angle                                      float64
	X, Y                                       float64
	Radius, RadiusStart                        float64
	StrokeMin                                  float64
	StrokeMax                                  float64
	Color                                      color.RGBA
	AltColor1, AltColor2, AltColor3, AltColor4 *color.RGBA
	OverlayColor                               *color.RGBA
}

func (TechRing) Draw added in v0.9.5

func (drawer TechRing) Draw(ctx *canvas.Context) error

type Walker

type Walker struct {
	RNG               prng.Generator
	Direction         string
	DirectionVariance int64
	X, Y, Vx, Vy      float64
	Color             color.Color
	Noise             opensimplex.Noise
	NoiseStepFactor   float64
	NoiseDimensions   int
	Grid              bool
	StrokeWidth       float64

	DirectionChangeStep         float64
	DirectionChangeStepModifier float64
	// contains filtered or unexported fields
}

func (*Walker) Draw

func (wlk *Walker) Draw(ctx *canvas.Context)

func (Walker) InBounds

func (wlk Walker) InBounds(ctx *canvas.Context) bool

func (*Walker) Move

func (wlk *Walker) Move()

func (Walker) String

func (wlk Walker) String() string

func (*Walker) Velocity

func (wlk *Walker) Velocity()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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