imgcanvas

package
v0.0.59 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: GPL-3.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 ImgCanvas

type ImgCanvas struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ImgCanvas is a board.Canvas type that just stores the state as an image.Image

func New

func New(width int, height int, logger *zap.Logger) *ImgCanvas

New ...

func (*ImgCanvas) AlwaysRender added in v0.0.29

func (i *ImgCanvas) AlwaysRender() bool

AlwaysRender ...

func (*ImgCanvas) At

func (i *ImgCanvas) At(x, y int) color.Color

At returns the color of the pixel at (x, y)

func (*ImgCanvas) Bounds

func (i *ImgCanvas) Bounds() image.Rectangle

Bounds return the topology of the Canvas

func (*ImgCanvas) Clear

func (i *ImgCanvas) Clear() error

Clear sets the canvas to all black

func (*ImgCanvas) Close

func (i *ImgCanvas) Close() error

Close ...

func (*ImgCanvas) ColorModel

func (i *ImgCanvas) ColorModel() color.Model

ColorModel returns the canvas' color model, always color.RGBAModel

func (*ImgCanvas) Disable

func (i *ImgCanvas) Disable()

Disable ...

func (*ImgCanvas) Enable

func (i *ImgCanvas) Enable()

Enable ...

func (*ImgCanvas) Enabled

func (i *ImgCanvas) Enabled() bool

Enabled ...

func (*ImgCanvas) GetHTTPHandlers

func (i *ImgCanvas) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*ImgCanvas) Name

func (i *ImgCanvas) Name() string

Name ...

func (*ImgCanvas) Render

func (i *ImgCanvas) Render(ctx context.Context) error

Render stores the state of the image as a PNG

func (*ImgCanvas) Scrollable added in v0.0.29

func (i *ImgCanvas) Scrollable() bool

Scrollable ...

func (*ImgCanvas) Set

func (i *ImgCanvas) Set(x, y int, clr color.Color)

Set set LED at position x,y to the provided 24-bit color value

Jump to

Keyboard shortcuts

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