Documentation ¶
Index ¶
- Constants
- func MakeGPUSpriteMap(font *LbxFont) (*ebiten.Image, int, int, int, int)
- func MakeGPUSpriteMapWithPalette(font *LbxFont, palette color.Palette) (*ebiten.Image, int, int, int, int)
- type Font
- func (font *Font) CreateWrappedText(maxWidth float64, scale float64, text string) WrappedText
- func (font *Font) Height() int
- func (font *Font) MeasureTextWidth(text string, scale float64) float64
- func (font *Font) Print(image *ebiten.Image, x float64, y float64, scale float64, ...)
- func (font *Font) PrintCenter(image *ebiten.Image, x float64, y float64, scale float64, ...)
- func (font *Font) PrintRight(image *ebiten.Image, x float64, y float64, scale float64, ...)
- func (font *Font) PrintWrap(image *ebiten.Image, x float64, y float64, maxWidth float64, scale float64, ...)
- func (font *Font) PrintWrapCenter(image *ebiten.Image, x float64, y float64, maxWidth float64, scale float64, ...)
- func (font *Font) RenderWrapped(image *ebiten.Image, x float64, y float64, wrapped WrappedText, ...)
- type Glyph
- type LbxFont
- type WrappedText
Constants ¶
View Source
const NewLine = 0x14
FIXME: put this somewhere else
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Font ¶
type Font struct { Image *ebiten.Image GlyphWidth int GlyphHeight int Rows int Columns int Glyphs []Glyph // contains filtered or unexported fields }
func MakeOptimizedFont ¶
func (*Font) CreateWrappedText ¶
func (font *Font) CreateWrappedText(maxWidth float64, scale float64, text string) WrappedText
precompute an object that can be used to render a wrapped string
func (*Font) MeasureTextWidth ¶
func (*Font) PrintCenter ¶
func (*Font) PrintRight ¶
func (*Font) PrintWrapCenter ¶
func (*Font) RenderWrapped ¶
func (font *Font) RenderWrapped(image *ebiten.Image, x float64, y float64, wrapped WrappedText, colorScale ebiten.ColorScale, center bool)
type WrappedText ¶
func (*WrappedText) Clear ¶
func (text *WrappedText) Clear()
Click to show internal directories.
Click to hide internal directories.