assets

package
v0.0.0-...-1659512 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Char

type Char struct {
	X       int `json:"x"`
	Y       int `json:"y"`
	Width   int `json:"width"`
	Height  int `json:"height"`
	OriginX int `json:"originX"`
	OriginY int `json:"originY"`
	Advance int `json:"advance"`
}

type CharSet

type CharSet struct {
	Name       string          `json:"name"`
	Size       int             `json:"size"`
	Bold       bool            `json:"bold"`
	Italic     bool            `json:"italic"`
	Width      int             `json:"width"`
	Height     int             `json:"height"`
	Characters map[string]Char `json:"characters"`
}

type GlyphTexture

type GlyphTexture struct {
	// contains filtered or unexported fields
}

func NewGlyphTexture

func NewGlyphTexture(renderer *renderers.Renderer, imagePath string, descriptionPath string) (*GlyphTexture, error)

NewGlyphTexture generates a new GlyphTexture from the provided image and description file.

func (*GlyphTexture) Destroy

func (g *GlyphTexture) Destroy()

Destroy the GlyphTexture (do not use it afterwards)

func (*GlyphTexture) Get

func (g *GlyphTexture) Get(c string) (renderers.Glyph, bool)

Get returns a glyph with Dst set to render at origin (0,0). Returns true as second value if the operation was successfull.

Jump to

Keyboard shortcuts

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