blend

package
v0.0.0-...-bbf78bc Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Darken

func Darken(bg, fg color.Color) color.Color

Subtract return a blending between the two colors that uses the lower values of each channel of the two colors before applying a normal blend

func Lighten

func Lighten(bg, fg color.Color) color.Color

Subtract return a blending between the two colors that uses the higher values of each channel of the two colors before applying a normal blend

func Normal

func Normal(bg, fg color.Color) color.Color

Normal returns a blending between the two colors based on the alpha channel of the foreground color

func Subtract

func Subtract(bg, fg color.Color) color.Color

Subtract return a blending between the two colors that makes a difference between the two before applying a normal blend

Types

type Blender

type Blender func(image.Image, image.Image, image.Point, mask.Mask) image.Image

Blender is a function that receives 2 images, a background and a foreground one a position for the origin of the second and a mask to interpolate with

func Blend

func Blend(blendingStrategy BlendingStrategy) Blender

Blend returns a Blender function using the given BlendingStrategy

type BlendingStrategy

type BlendingStrategy func(color.Color, color.Color) color.Color

BlendingStrategy receives two colors and returns a blend between the two

Jump to

Keyboard shortcuts

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