Documentation ¶
Index ¶
- func Abs(x int) int
- func BiLERP(p1, p2, p3, p4, alpha, beta float64) float64
- func Clamp(x, min, max float64) float64
- func ClampUint16(x float64) float64
- func ClampUint32(x float64) float64
- func ClampUint64(x float64) float64
- func ClampUint8(x float64) float64
- func CreateBackground(bounds image.Rectangle, col color.Color) image.Image
- func CreateRGBA(bounds image.Rectangle) image.Image
- func EaseInCubic(t float64) float64
- func EaseInLinear(t float64) float64
- func EaseInOutCubic(t float64) float64
- func EaseInOutQuad(t float64) float64
- func EaseInOutQuart(t float64) float64
- func EaseInQuad(t float64) float64
- func EaseInQuart(t float64) float64
- func EaseOutCubic(t float64) float64
- func EaseOutLinear(t float64) float64
- func EaseOutQuad(t float64) float64
- func EaseOutQuart(t float64) float64
- func GeneratePallet(img image.Image, numColors int) []color.Color
- func LERP(p1, p2, alpha float64) float64
- func Max(x, y int) int
- func Min(x, y int) int
- func PixelBiLERP(p1, p2, p3, p4 color.Color, alpha, beta float64) color.Color
- func PixelLERP(p1, p2 color.Color, alpha float64) color.Color
- type EasingFunction
- type Kernel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClampUint16 ¶
ClampUint16 returns given value clamped into uint16 range
func ClampUint32 ¶
ClampUint32 returns given value clamped into uint32 range
func ClampUint64 ¶
ClampUint64 returns given value clamped into uint64 range
func ClampUint8 ¶
ClampUint8 returns given value clamped into uint8 range
func CreateBackground ¶
CreateBackground returns an image with the given size and a monochrome background of the given color
func CreateRGBA ¶
CreateRGBA returns an image with the given size
func EaseInCubic ¶
EaseInCubic based on https://gist.github.com/gre/1650294
func EaseInLinear ¶
EaseInLinear based on https://gist.github.com/gre/1650294
func EaseInOutCubic ¶
EaseInOutCubic based on https://gist.github.com/gre/1650294
func EaseInOutQuad ¶
EaseInOutQuad based on https://gist.github.com/gre/1650294
func EaseInOutQuart ¶
EaseInOutQuart based on https://gist.github.com/gre/1650294
func EaseInQuad ¶
EaseInQuad based on https://gist.github.com/gre/1650294
func EaseInQuart ¶
EaseInQuart based on https://gist.github.com/gre/1650294
func EaseOutCubic ¶
EaseOutCubic based on https://gist.github.com/gre/1650294
func EaseOutLinear ¶
EaseOutLinear based on https://gist.github.com/gre/1650294
func EaseOutQuad ¶
EaseOutQuad based on https://gist.github.com/gre/1650294
func EaseOutQuart ¶
EaseOutQuart based on https://gist.github.com/gre/1650294
func GeneratePallet ¶
GeneratePallet generates a pallet for the given image with the given maximum number of colors
func PixelBiLERP ¶
PixelBiLERP is an application of BiLERP on each color channel
Types ¶
type EasingFunction ¶
EasingFunction returns a value between 0 and 1 for a given factor between 0 and 1
func MirrorSpike ¶
func MirrorSpike(f EasingFunction) EasingFunction
MirrorSpike returns a spike function with the maximum in the middle
func Spike ¶
func Spike(threshold float64, f EasingFunction) EasingFunction
Spike returns a spike function with the given threshold for them maximum value and an EasingFunction for the 2 parts
func Step ¶
func Step(threshold float64) EasingFunction
Step returns a step function with the given threshold
func Wave ¶
func Wave(threshold float64, f EasingFunction) EasingFunction
Wave returns a spike function with the shape of a wave