Documentation ¶
Index ¶
- Variables
- func ConvertImage(image *image.RGBA) []byte
- func GetLEDConnection() (io.ReadWriteCloser, error)
- func GetLEDConnectionAtRate(baudRate int) (io.ReadWriteCloser, error)
- func ResolveImagePath(relativePath string) string
- func SetImageDir(newDir string)
- func WriteLEDMatrix(image *image.RGBA, s io.ReadWriteCloser)
- type AnimatedImage
- type Image
- type MaskImage
- type SingleImage
Constants ¶
This section is empty.
Variables ¶
View Source
var R = (255 * math.Log10(2)) / (math.Log10(255))
From https://diarmuid.ie/blog/post/pwm-exponential-led-fading-on-arduino-or-other-platforms
Functions ¶
func ConvertImage ¶
func GetLEDConnection ¶
func GetLEDConnection() (io.ReadWriteCloser, error)
func GetLEDConnectionAtRate ¶
func GetLEDConnectionAtRate(baudRate int) (io.ReadWriteCloser, error)
func ResolveImagePath ¶
resolves a relative image path to a fully qialified path.
func WriteLEDMatrix ¶
func WriteLEDMatrix(image *image.RGBA, s io.ReadWriteCloser)
Write an image into the led matrix
Types ¶
type AnimatedImage ¶
type AnimatedImage struct {
// contains filtered or unexported fields
}
func LoadGif ¶
func LoadGif(src string) *AnimatedImage
func (*AnimatedImage) GetNextFrame ¶
func (i *AnimatedImage) GetNextFrame() *image.RGBA
func (*AnimatedImage) GetPositionFrame ¶
func (i *AnimatedImage) GetPositionFrame(position float64, blend bool) *image.RGBA
GetPositionFrame returns the frame corresponding to the position given 0....1
type Image ¶
type MaskImage ¶
type MaskImage struct {
Image Image
}
MaskImage wraps an image so that the red level is used as the transparency.
It allows animated gifs to be used as masks, with 255 levels of alpha.
func (*MaskImage) GetNextFrame ¶
type SingleImage ¶
type SingleImage struct {
// contains filtered or unexported fields
}
func NewSingleImage ¶
func NewSingleImage(frame *image.RGBA) *SingleImage
func NewSingleImageConvert ¶
func NewSingleImageConvert(frame image.Image) *SingleImage
func (*SingleImage) GetNextFrame ¶
func (i *SingleImage) GetNextFrame() *image.RGBA
func (*SingleImage) GetPositionFrame ¶
func (i *SingleImage) GetPositionFrame(position float64, blend bool) *image.RGBA
Click to show internal directories.
Click to hide internal directories.