text

package
v0.0.0-...-9b4341a Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2016 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TextureWidth  int
	TextureHeight int
	PixelsPerUnit float32
}

type FontFace

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

func NewFontFace

func NewFontFace(path string, pixels float32, fg, bg color.Color) (fontface *FontFace, err error)

func (*FontFace) GetImage

func (ff *FontFace) GetImage(text string) (img draw.Image, err error)

func (*FontFace) GetText

func (ff *FontFace) GetText(text string) (t *core.Texture, err error)

type TextInstanceList

type TextInstanceList struct {
	*render.InstanceList
	// contains filtered or unexported fields
}

func NewTextInstanceList

func NewTextInstanceList(cfg Config) *TextInstanceList

func (*TextInstanceList) Bind

func (l *TextInstanceList) Bind()

func (*TextInstanceList) Delete

func (l *TextInstanceList) Delete()

func (*TextInstanceList) SetText

func (l *TextInstanceList) SetText(instance *render.Instance, text string, font *FontFace) (err error)

func (*TextInstanceList) Sheet

func (l *TextInstanceList) Sheet() *sprites.PackedSheet

func (*TextInstanceList) Unbind

func (l *TextInstanceList) Unbind()

Jump to

Keyboard shortcuts

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