sdf

package
v0.0.0-...-ad71f99 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphaFromGrey

func AlphaFromGrey(grey image.Image) image.Image

func GenerateDistanceFieldImage

func GenerateDistanceFieldImage(inputImage image.Image, downscale int, spread float64, sourceChannels [4]bool, threshold float64, crop bool) image.Image

Types

type BoolGrid

type BoolGrid struct {
	W, H int
	// contains filtered or unexported fields
}

BoolGrid is a grid of booleans used to represent if a pixel of an image is to be considered "inside" the shape

func NewBoolGrid

func NewBoolGrid(w, h int) *BoolGrid

func (*BoolGrid) At

func (m *BoolGrid) At(x, y int) bool

func (*BoolGrid) Crop

func (m *BoolGrid) Crop() *BoolGrid

func (*BoolGrid) Set

func (m *BoolGrid) Set(value bool, x, y int)

Jump to

Keyboard shortcuts

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