sprite

package
v0.0.0-...-1cf6f13 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sprite

type Sprite [][]color.Color

func FromImageSection

func FromImageSection(image image.Image, startX, startY, spritesize int) Sprite

func (Sprite) Copy

func (s Sprite) Copy() Sprite

Prevents accidental mutation by copying the sprite into a new sprite. This as values of slices in Go are references.

func (Sprite) FlipHorizontally

func (s Sprite) FlipHorizontally()

func (Sprite) FlipVertically

func (s Sprite) FlipVertically()

func (Sprite) ID

func (s Sprite) ID() string

Generates an ID for the sprite by concatenating all values into a string.

func (Sprite) Identical

func (s Sprite) Identical(b Sprite) bool

func (Sprite) IdenticalIfFlippedHorizontally

func (s Sprite) IdenticalIfFlippedHorizontally(b Sprite) bool

func (Sprite) IdenticalIfFlippedVertically

func (s Sprite) IdenticalIfFlippedVertically(b Sprite) bool

func (Sprite) IdenticalIfRotated

func (s Sprite) IdenticalIfRotated(b Sprite) bool

func (Sprite) Rotate

func (s Sprite) Rotate()

type Sprites

type Sprites []Sprite

func NewSpritesFromImage

func NewSpritesFromImage(image image.Image, spriteSize int) Sprites

func (Sprites) ID

func (sp Sprites) ID() string

Generates an aggregate ID based on the underlying sprite IDs.

func (Sprites) ToSet

func (sp Sprites) ToSet() (set Sprites)

Removes all duplicate sprites in collection.

Jump to

Keyboard shortcuts

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