emulator

package
v0.0.0-...-9d5060a Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPixelPitch = 12

Variables

This section is empty.

Functions

This section is empty.

Types

type Emulator

type Emulator struct {
	PixelPitch              int
	Gutter                  int
	Width                   int
	Height                  int
	GutterColor             color.Color
	PixelPitchToGutterRatio int
	Margin                  int
	// contains filtered or unexported fields
}

func NewEmulator

func NewEmulator(w, h, pixelPitch int, autoInit bool) *Emulator

func (*Emulator) Apply

func (e *Emulator) Apply(leds []color.Color) error

func (*Emulator) At

func (e *Emulator) At(position int) color.Color

func (*Emulator) Close

func (e *Emulator) Close() error

func (*Emulator) Geometry

func (e *Emulator) Geometry() (width, height int)

func (*Emulator) GetBrightness

func (e *Emulator) GetBrightness() int

Those new functions have no use with the emulator

func (*Emulator) Init

func (e *Emulator) Init()

Init initialize the emulator, creating a new Window and waiting until is painted. If something goes wrong the function panics

func (*Emulator) Render

func (e *Emulator) Render() error

func (*Emulator) Set

func (e *Emulator) Set(position int, c color.Color)

func (*Emulator) SetBrightness

func (e *Emulator) SetBrightness(brightness int)

Jump to

Keyboard shortcuts

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