texturing

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoxBlur

func BoxBlur(src image.Image) image.Image

func BoxBlurNTimes

func BoxBlurNTimes(src image.Image, iterations int) image.Image

func Convolve

func Convolve(src image.Image, f func(x, y int, values []color.Color))

[0][1][2] [3][4][5] [6][7][8]

func ConvolveArray added in v0.9.0

func ConvolveArray[T any](arr [][]T, f func(x, y int, kernel []T))

func GaussianBlur

func GaussianBlur(src image.Image) image.Image

func SimpleEdgeTest added in v0.9.0

func SimpleEdgeTest(kernel []color.Color) bool

Types

type DebugUVTexture added in v0.10.0

type DebugUVTexture struct {
	ImageResolution int
	BoardResolution int

	PositiveCheckerColor color.Color
	NegativeCheckerColor color.Color

	XColorScale color.Color
	YColorScale color.Color
}

func (DebugUVTexture) Image added in v0.10.0

func (duvt DebugUVTexture) Image() image.Image

type Texture added in v0.25.0

type Texture[T any] struct {
	// contains filtered or unexported fields
}

func Convert added in v0.25.0

func Convert[T, G any](in Texture[T], cb func(x int, y int, v T) G) Texture[G]

func NewTexture added in v0.25.0

func NewTexture[T any](width, height int) Texture[T]

func (Texture[T]) Copy added in v0.25.0

func (t Texture[T]) Copy() Texture[T]

func (Texture[T]) Fill added in v0.25.0

func (t Texture[T]) Fill(v T)

func (Texture[T]) Get added in v0.25.0

func (t Texture[T]) Get(x, y int) T

func (Texture[T]) Height added in v0.25.0

func (t Texture[T]) Height() int

func (Texture[T]) SaveImage added in v0.25.0

func (t Texture[T]) SaveImage(fp string, conv func(T) color.Color) error

func (Texture[T]) Scan added in v0.25.0

func (t Texture[T]) Scan(cb func(x int, y int, v T))

func (Texture[T]) SearchNeighborhood added in v0.25.0

func (t Texture[T]) SearchNeighborhood(start vector2.Int, size int, cb func(x int, y int, v T))

func (Texture[T]) Set added in v0.25.0

func (t Texture[T]) Set(x, y int, v T)

func (Texture[T]) ToImage added in v0.25.0

func (t Texture[T]) ToImage(f func(T) color.Color) image.Image

func (Texture[T]) Width added in v0.25.0

func (t Texture[T]) Width() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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