package tiles
import "github.com/anaseto/gruid/tiles"
Package tiles provides common utilities for manipulation of graphical tiles, such as drawing fonts.
Index ¶
Types ¶
type Drawer ¶
type Drawer struct {
// contains filtered or unexported fields
}
Drawer can be used to draw a text rune on an image of appropriate size to be used as a tile. See the example in examples/messages/tiles.go for an example of use.
func NewDrawer ¶
NewDrawer returns a new tile Drawer given a monospace font face.
func (*Drawer) Draw ¶
Draw draws a rune and returns the produced image with foreground and background colors given by images fg and bg.
func (*Drawer) Size ¶
Size returns the size of drawn tiles, in pixel points.
Source Files ¶
- Version
- v0.22.0 (latest)
- Published
- Oct 23, 2022
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 15 hours ago –
Tools for package owners.