text

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package text offers functions to draw texts on an Ebiten's image.

Note: This package is experimental and API might be changed.

For the example using a TTF font, see font package in the examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Draw

func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Color)

Draw draws a given text on a given destination image dst.

face is the font for text rendering. (x, y) represents a 'dot' (period) position. Be careful that this doesn't represent left-upper corner position. clr is the color for text rendering.

Glyphs used for rendering are cached in least-recently-used way. It is OK to call this function with a same text and a same face at every frame in terms of performance.

This function is concurrent-safe.

Types

This section is empty.

Jump to

Keyboard shortcuts

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