screen

package
v0.0.0-...-14b0d1b Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package screen provides access to the Sense HAT's 8x8 LED matrix.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear() error

Clear the screen (off).

func Draw

func Draw(fb *FrameBuffer) error

Draw a buffer to the LED matrix screen.

func DrawImage

func DrawImage(m image.Image) error

DrawImage draws an image to the LED matrix screen.

Types

type FrameBuffer

type FrameBuffer struct {
	*texture.Texture
}

FrameBuffer is an 8x8 texture that can draw to the LED Matrix.

func NewFrameBuffer

func NewFrameBuffer(options ...func(*FrameBuffer)) *FrameBuffer

NewFrameBuffer creates a back buffer for the screen.

func (*FrameBuffer) At

func (fb *FrameBuffer) At(x, y int) color.Color

At returns the color of the LED at x,y

func (*FrameBuffer) Bounds

func (fb *FrameBuffer) Bounds() image.Rectangle

Bounds of the frame buffer (it is 8x8)

func (*FrameBuffer) ColorModel

func (fb *FrameBuffer) ColorModel() color.Model

ColorModel of the frame buffer

func (*FrameBuffer) Set

func (fb *FrameBuffer) Set(x, y int, c color.Color)

Set the color of the LED at x,y

func (*FrameBuffer) SetImage

func (fb *FrameBuffer) SetImage(m image.Image)

SetImage sets the frame buffer to the provided image

Directories

Path Synopsis
Package color defines a 16-bit RGB565 color.
Package color defines a 16-bit RGB565 color.
Package texture loads and creates abitrary sized RGB565 images.
Package texture loads and creates abitrary sized RGB565 images.

Jump to

Keyboard shortcuts

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