Documentation
¶
Index ¶
- func AppendFallbackFonts(names []string) []string
- func NewFS(dev EinkDevice, mkimg func(r image.Rectangle) draw.Image, logger *log.Logger, ...) ninep.FileSystem
- func NewImage1bitVerticalLSB(r image.Rectangle) draw.Image
- func NewWaveshare2in13v2FS(fset FontSet, logger *log.Logger, rotation int) (f ninep.FileSystem, close func(), err error)
- type EinkDevice
- type FontSet
- type NullEinkDevice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFallbackFonts ¶
func NewWaveshare2in13v2FS ¶
Types ¶
type EinkDevice ¶
type EinkDevice interface {
Draw(dstRect image.Rectangle, src image.Image, srcPts image.Point) error
Bounds() image.Rectangle
Clear(color.Color) error
}
func NewNullEinkDevice ¶
func NewNullEinkDevice(size image.Point) EinkDevice
type FontSet ¶
type FontSet struct {
Faces []font.Face
Fonts []*sfnt.Font
Collections []*sfnt.Collection
Names []string
Options *opentype.FaceOptions
}
func LoadFonts ¶
LoadFonts loads a set of named fonts from the given file system. The fonts are used in order to render to text based on each font's available glyphs.
Any invalid fonts are silently ignored.
func (FontSet) RenderText ¶
RenderText renders the given text to the destination image using the loaded fonts. The start function is used to determine the starting point for the text.
func (*FontSet) Reset ¶
func (s *FontSet) Reset(opts *opentype.FaceOptions)
type NullEinkDevice ¶
func (NullEinkDevice) Bounds ¶
func (d NullEinkDevice) Bounds() image.Rectangle
Click to show internal directories.
Click to hide internal directories.