Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator interface { // Convert converts the x/y/color pixel value into an IPv6 address. Convert(x, y int, c color.Color) netip.Addr }
Generator represents a pixel to IPv6 address generator.
func NewLegacy ¶
func NewLegacy(prefix string, options GeneratorOpts) Generator
NewLegacy returns a configured Legacy Generator.
type GeneratorOpts ¶
type GeneratorOpts struct { // Color mode to use. ColorMode string // Pixel offsets. Offset image.Point // Canvas size CanvasSize image.Point }
GeneratorOpts contains the options for initializing a generator.
type Legacy ¶
type Legacy struct {
// contains filtered or unexported fields
}
Legacy implements the original IPv6 Christmas tree LED screen format. The pixel format for this is: <prefix>:<x>:<y>:<r>:<g>:<b>, with x/y in decimal and r/g/b in hexadecimal.
type RGBA ¶
type RGBA struct {
// contains filtered or unexported fields
}
RGBA represents a generic RGBA generator. The pixel format for this is <prefix>:<x>:<y>:<c><c>:<c><c>, where c can be the R, G, B or A value.
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree implements the Generator for the simple IPv6 Christmas tree. The pixel format of this is <prefix>:<r>:<g>:<b> (in hex). Note that there is no x/y information.