display

package
v0.261016.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: CC0-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Display

type Display struct {
	// contains filtered or unexported fields
}

func NewFb

func NewFb(dev string) (*Display, error)

func NewMock

func NewMock(size image.Point) *Display

func (*Display) Clear

func (d *Display) Clear() error

func (*Display) ClearFB

func (d *Display) ClearFB()

func (*Display) CopyFile2FB added in v0.220206.0

func (d *Display) CopyFile2FB(f string) error

func (*Display) DrawText added in v0.261016.0

func (d *Display) DrawText(text string, size float64, x float64, y float64) error

func (*Display) Flush

func (d *Display) Flush() error

func (*Display) OverlayText added in v0.261016.0

func (d *Display) OverlayText(text string, size float64, x float64, y float64, fgColor, bgColor color.Color) error

OverlayText накладывает однострочный текст поверх буфера. Если bgColor == nil или его альфа-канал == 0, фон не рисуется.

func (*Display) OverlayTextSimple added in v0.261016.0

func (d *Display) OverlayTextSimple(text string, size float64, x float64, y float64) error

func (*Display) OverlayTextWrapped added in v0.261016.0

func (d *Display) OverlayTextWrapped(text string, size, x, y, maxWidth float64, fgColor, bgColor color.Color) error

OverlayTextWrapped накладывает многострочный текст с переносом по словам. maxWidth <= 0 -> использовать ширину от x до правого края дисплея. Если слово шире maxWidth, оно разбивается посимвольно.

func (*Display) OverlayTextWrappedSimple added in v0.261016.0

func (d *Display) OverlayTextWrappedSimple(text string, size, x, y, maxWidth float64) error

func (*Display) QR

func (d *Display) QR(text string, border bool, level qrcode.RecoveryLevel) error

func (*Display) String2

func (d *Display) String2() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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