utils

package
v0.0.0-...-5564bc9 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColorOver

func ColorOver(dc, sc color.Color) color.Color

func FillImage

func FillImage(m draw.Image, c color.Color)

func Lerp

func Lerp(v0, v1 float64, t float64) float64

Lerp - Linear interpolation t= [0, 1] (t == 0) => v0 (t == 1) => v1

func LerpColor

func LerpColor(c0, c1 color.Color, t float64) color.Color

func NewImageBySize

func NewImageBySize(imageSize image.Point) draw.Image

func ParseColor

func ParseColor(s string) (color.Color, error)

func ParseSize

func ParseSize(s string) (image.Point, error)

func ReadConfigJSON

func ReadConfigJSON(filename string, config interface{}) error

func RotateDown

func RotateDown(s Swapper)

a b c d e f

/ / / / /

b c d e f a

func RotateUp

func RotateUp(s Swapper)

a b c d e f

\ \ \ \ \

f a b c d e

func Round

func Round(a float64) int

func SaveImage

func SaveImage(filename string, m image.Image) error

func WriteConfigJSON

func WriteConfigJSON(filename string, config interface{}) error

Types

type Swapper

type Swapper interface {
	Len() int
	Swap(i, j int)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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