Documentation ¶
Index ¶
Constants ¶
View Source
const Solid = '\uE000'
Solid is an item key for an item that is a single solid (opaque) pixel.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TextureAtlas ¶
type TextureAtlas struct { Texture uint32 // contains filtered or unexported fields }
func NewTextureAtlas ¶
func NewTextureAtlas(maxGlyphWidth, maxGlyphHeight int) *TextureAtlas
func (*TextureAtlas) AddItem ¶
func (ta *TextureAtlas) AddItem( key string, pixels *[]byte, width, height int, topBearing, leftBearing float32, ) *TextureItem
func (*TextureAtlas) Item ¶
func (ta *TextureAtlas) Item(key string) *TextureItem
type TextureItem ¶
type TextureItem struct { // in pixels PixelLeft int PixelRight int PixelTop int PixelBottom int // in pixels TopBearing float32 LeftBearing float32 // in texture co-ordinates Left float32 Top float32 Right float32 Bottom float32 // contains filtered or unexported fields }
func (*TextureItem) PixelHeight ¶
func (ti *TextureItem) PixelHeight() int
func (*TextureItem) PixelWidth ¶
func (ti *TextureItem) PixelWidth() int
Click to show internal directories.
Click to hide internal directories.