texture

package
v0.0.0-...-f6fd52c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CenterGeoM

func CenterGeoM(t *ebiten.Image) ebiten.GeoM

func NewAbilityTexture

func NewAbilityTexture(iconName string) *ebiten.Image

func NewMapTexture

func NewMapTexture(mapName string) *ebiten.Image

func NewTextureFromFile

func NewTextureFromFile(filepath string) *ebiten.Image

Types

type NineSlice

type NineSlice struct {
	Texture                  *ebiten.Image
	Width                    int
	Height                   int
	Top, Bottom, Left, Right int
	SubImages                [9]*ebiten.Image
}

func NewNineSlice

func NewNineSlice(t *ebiten.Image, top, bottom, left, right int) *NineSlice

func (*NineSlice) Draw

func (n *NineSlice) Draw(screen *ebiten.Image, frame image.Rectangle, colorScale *ebiten.ColorScale)

type SubTexture

type SubTexture struct {
	Name      string     `xml:"name,attr"`
	X         int        `xml:"x,attr"`
	Y         int        `xml:"y,attr"`
	W         int        `xml:"w,attr"`
	H         int        `xml:"h,attr"`
	Top       int        `xml:"top,attr"`
	Bottom    int        `xml:"bottom,attr"`
	Left      int        `xml:"left,attr"`
	Right     int        `xml:"right,attr"`
	NiceSlice *NineSlice `xml:"-"`
}

func (*SubTexture) InitNineSlice

func (s *SubTexture) InitNineSlice(mainTexture *ebiten.Image)

type TextureAtlas

type TextureAtlas struct {
	MainTexture *ebiten.Image `xml:"-"`
	SubTextures []*SubTexture `xml:"SubTexture"`
	// contains filtered or unexported fields
}

func NewTextureAtlasFromFile

func NewTextureAtlasFromFile(file string) *TextureAtlas

func (*TextureAtlas) GetNineSlice

func (a *TextureAtlas) GetNineSlice(name string) *NineSlice

Jump to

Keyboard shortcuts

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