font

package
v0.0.0-...-d216d2d Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Billboard

type Billboard struct {
	Width  int
	Height int
	// contains filtered or unexported fields
}

Billboard is an object for font rendering

func (*Billboard) Destroy

func (billboard *Billboard) Destroy()

Destroy frees up the vertex array and texture

func (*Billboard) Draw

func (billboard *Billboard) Draw(params DrawBillboardParams)

Draw will draw the billboard

func (*Billboard) SetText

func (billboard *Billboard) SetText(text string)

SetText updates the billboard text

type DrawBillboardParams

type DrawBillboardParams struct {
	X, Y, Z                         float32
	RotationX, RotationY, RotationZ float32
	Scale                           bool
	ScaleX, ScaleY, ScaleZ          float32
	R, G, B, A                      float32
}

type Font

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

Font object

func New

func New(file string) (*Font, error)

New returns a newly created Font object

func (*Font) NewBillboard

func (font *Font) NewBillboard(params NewBillboardParams) *Billboard

NewBillboard creates a 2D billboard for rendering

type NewBillboardParams

type NewBillboardParams struct {
	Text      string
	MaxWidth  int
	MaxHeight int
	Size      float64
	Dpi       float64
}

Jump to

Keyboard shortcuts

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