Documentation ¶
Index ¶
- Constants
- Variables
- type HardwareConfig
- type HardwareMapping
- type Matrix
- func (m *Matrix) At(x, y int) color.Color
- func (m *Matrix) Bounds() image.Rectangle
- func (m *Matrix) Close() error
- func (m *Matrix) ColorModel() color.Model
- func (m *Matrix) PWMBits() int
- func (m *Matrix) Render()
- func (m *Matrix) Set(x, y int, c color.Color)
- func (m *Matrix) SetPWMBits(pwmBits int)
- type ScanMode
Constants ¶
View Source
const ( Progressive = ScanMode(iota + 1) Interlaced )
Variables ¶
View Source
var DefaultHardwareConfig = HardwareConfig{ Rows: 64, Cols: 64, PWMBits: 5, Brightness: 100, ScanMode: Interlaced, Mapping: DefaultHardwareMapping, ShowRefreshRate: true, }
DefaultHardwareConfig default WS281x configuration
View Source
var DefaultHardwareMapping = HardwareMapping{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type HardwareConfig ¶
type HardwareConfig struct { // Rows the number of rows supported by the display, so 32 or 16. Rows int // Cols the number of columns supported by the display, so 32 or 64 . Cols int // PWMBits sets PWM bits used for output. Default is 11, but if you only deal with // limited comic-colors, 1 might be sufficient. Lower require less CPU and // increases refresh-rate. PWMBits int // Brightness is the initial brightness of the panel in percent. Valid range // is 1..100 Brightness int // ScanMode progressive or interlaced ScanMode ScanMode // strip color layout Mapping HardwareMapping ShowRefreshRate bool }
HardwareConfig rgb-led-matrix configuration
type HardwareMapping ¶
type HardwareMapping struct {
// contains filtered or unexported fields
}
type Matrix ¶
type Matrix struct {
// contains filtered or unexported fields
}
func (*Matrix) ColorModel ¶
ColorModel returns the canvas' color model, always color.RGBAModel
func (*Matrix) Render ¶
func (m *Matrix) Render()
Render renders the back buffer. It waits to the next VSync and swaps the active buffer with the back buffer one.
func (*Matrix) SetPWMBits ¶
SetPWMBits sets PWM bits used for output. Default is 11, but if you only deal with limited comic-colors, 1 might be sufficient. Lower require less CPU and increases refresh-rate.
Click to show internal directories.
Click to hide internal directories.