Documentation ¶
Index ¶
- Constants
- func AddFontLibrary(family string, library FontLibrary)
- func AddFontLoad(fn FontLoad)
- func ColorFromString(v string) uint32
- func Draw(dst draw.Image, v *Layout, x, y, width, height float64, pleft float64, ...)
- func DrawString(F Font, dst draw.Image, u *image.Uniform, x, y float64, v string)
- func GetFamilys() []string
- func Load(path string)
- func MeasureString(F Font, v string) float64
- type Font
- type FontLibrary
- type FontLoad
- type Index
- type Item
- type Layout
- type LayoutItem
- type LayoutRow
- type Style
- type Text
- type TextAlignment
- type VerticalAlignment
Constants ¶
View Source
const ( TextAlignmentLeft = 0 TextAlignmentCenter = 1 TextAlignmentRight = 2 TextAlignmentJustified = 3 )
View Source
const ( VerticalAlignmentTop = 0 VerticalAlignmentMiddle = 1 VerticalAlignmentBottom = 2 )
Variables ¶
This section is empty.
Functions ¶
func AddFontLibrary ¶
func AddFontLibrary(family string, library FontLibrary)
func AddFontLoad ¶
func AddFontLoad(fn FontLoad)
func ColorFromString ¶
func GetFamilys ¶
func GetFamilys() []string
func MeasureString ¶
Types ¶
type Font ¶
type Layout ¶
type Layout struct { Rows []*LayoutRow // contains filtered or unexported fields }
type LayoutItem ¶
type LayoutRow ¶
type Style ¶
type Style struct { Font Font Color uint32 VerticalAlignment VerticalAlignment LetterSpacing float64 }
type TextAlignment ¶
type TextAlignment int
func TextAlignmentFromString ¶
func TextAlignmentFromString(v string) TextAlignment
func (TextAlignment) String ¶
func (T TextAlignment) String() string
type VerticalAlignment ¶
type VerticalAlignment int
func VerticalAlignmentFromString ¶
func VerticalAlignmentFromString(v string) VerticalAlignment
Click to show internal directories.
Click to hide internal directories.