canvas

package
v0.0.0-...-a545287 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Position

func Position(x, y, w int) int

Types

type Canvas

type Canvas interface {
	image.Image
	Set(x, y int, ledColor color.Color)
	Render() error
	Clear()
	Close() error
	GetLeds() *[]color.Color
}

Canvas is a image.Image representation of a LED matrix, it implements image.Image interface and can be used with draw.Draw for example

type FloatingPoint

type FloatingPoint struct {
	X, Y float64
}

func (FloatingPoint) Add

func (FloatingPoint) AddXY

func (fp FloatingPoint) AddXY(x, y float64) FloatingPoint

func (FloatingPoint) Int

func (fp FloatingPoint) Int() Point

func (FloatingPoint) String

func (fp FloatingPoint) String() string

type Pixel

type Pixel struct {
	X, Y int
	C    color.Color
}

type Point

type Point image.Point

func (Point) Add

func (p Point) Add(other Point) Point

func (Point) AddXY

func (p Point) AddXY(x, y int) Point

func (Point) Floating

func (p Point) Floating() FloatingPoint

type Positionable

type Positionable interface {
	SetPosition(position Point)
	GetPosition() Point
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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