generate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LinearGradient

func LinearGradient(size image.Point, startColor color.RGBA, endColor color.RGBA, direction Direction) *image.RGBA

LinearGradient generates a gradient image using a linear function.

func SigmoidalGradient

func SigmoidalGradient(size image.Point, startColor color.RGBA, endColor color.RGBA, direction Direction) *image.RGBA

SigmoidalGradient generates a gradient image using the sigmoid ( f(x) = 1 / (1 + exp(-x)) ) function.

Types

type Direction

type Direction int

Direction constant - direction of the gradient from first color to the second color.

const (
	// H - horizontal direction
	H Direction = iota
	// V - vertical direction
	V
)

Jump to

Keyboard shortcuts

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