filter

package
v0.0.0-...-4e89918 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crop

func Crop(source image.Image, layer transfer.Layer, props Properties) image.Image

Crop will cut out the middle of the source to get the desired size of the icon.

func Expand

func Expand(source image.Image, layer transfer.Layer, props Properties) image.Image

Expand applies additional padding to the source so it definitively exceeds the desired size of the icon. Note that the image will most likely be too large afterwards.

func Offset

func Offset(source image.Image, layer transfer.Layer, props Properties) image.Image

Offset applies the offset values of the layer to the source.

func RemoveMipMaps

func RemoveMipMaps(source image.Image, layer transfer.Layer, props Properties) image.Image

RemoveMipMaps is the filter for removing the mip maps of the source, only keeping the highest resolution of it.

func ResizeToOutput

func ResizeToOutput(source image.Image, layer transfer.Layer, props Properties) image.Image

ResizeToOutput will resize the source to the output size specified in the properties.

func Scale

func Scale(source image.Image, layer transfer.Layer, props Properties) image.Image

Scale applies the scaling value of the layer to the source.

func TintedBlendFilter

func TintedBlendFilter(destination, source image.Image, layer transfer.Layer, props Properties) image.Image

TintedBlendFilter blends the source onto the destination while applying the tint of the layer.

Types

type BlendFilter

type BlendFilter func(destination, source image.Image, layer transfer.Layer, props Properties) image.Image

BlendFilter blends the current layer image onto the image which has been generated so far.

type LayerFilter

type LayerFilter func(source image.Image, layer transfer.Layer, props Properties) image.Image

LayerFilter manipulates the current layer image of the icon.

type Properties

type Properties struct {
	RenderedSize  int
	RenderedScale float64
	OutputSize    int
}

Properties are additional values needed to render the icon.

func NewPropertiesFromIcon

func NewPropertiesFromIcon(icon transfer.Icon) Properties

NewPropertiesFromIcon creates the rendering properties for the specified icon.

Jump to

Keyboard shortcuts

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