Documentation ¶
Index ¶
- Variables
- func ImageToRGB24Bytes(img image.Image) []byte
- type Client
- func (c *Client) ClearAllTextArea() error
- func (c *Client) GetSendingAnimationPicID() (int, error)
- func (c *Client) ResetSendingAnimationPicId() error
- func (c *Client) SendAnimation(animationId int, numPictures int, pictureIndex int, width int, speed int, ...) error
- func (c *Client) SendDisplayList(elements ...DisplayListElement) error
- func (c *Client) SendText(id, x, y int, dir TextScrollDirection, font TextFont, width int, str string, ...) error
- func (c *Client) SetBrightness(brightness int) error
- func (c *Client) SetMirrorMode(mirrorMode MirrorMode) error
- func (c *Client) SetRotation(deviceIp string, rotation RotationAngle) error
- type Color
- type Device
- type DisplayListElement
- type MirrorMode
- type PixelFont
- type PixelGlyph
- type RgbImage
- func (img *RgbImage) Clear()
- func (img *RgbImage) DrawCharacter(character rune, x, y int, font PixelFont, color Color) int
- func (img *RgbImage) DrawCircle(centerX, centerY int, radius int, borderColor Color)
- func (img *RgbImage) DrawCircleFilled(centerX, centerY int, radius int, borderColor Color, fillColor Color)
- func (img *RgbImage) DrawGlyph(glyph PixelGlyph, x, y int, color Color) int
- func (img *RgbImage) DrawImage(x, y int, goImg image.Image)
- func (img *RgbImage) DrawLine(startX, startY int, endX, endY int, color Color)
- func (img *RgbImage) DrawPixel(x, y int, color Color)
- func (img *RgbImage) DrawPixelAtIndex(index int, color Color)
- func (img *RgbImage) DrawRectangle(left, top int, width, height int, borderColor Color)
- func (img *RgbImage) DrawRectangleFilled(left, top int, width, height int, borderColor Color, fillColor Color)
- func (img *RgbImage) DrawText(text string, x, y int, font PixelFont, color Color, alignment TextAlignment) int
- func (img *RgbImage) Fill(color Color)
- func (img *RgbImage) SaveToPng(path string, scale int) error
- type RotationAngle
- type TextAlignment
- type TextFont
- type TextScrollDirection
- type TextType
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors colors
A handfull of colors ready to be used.
View Source
var (
ErrInvalidBrightness = fmt.Errorf("brightness should be in range of 0-100")
)
View Source
var FontPico8 = PixelFont{ FontName: "Pico8", Description: "Slim (3x5) font with upper- and lowercase letters, numbers and symbols", FixedWidth: true, FontSpacing: 1, LineHeight: 5, Glyphs: map[rune]PixelGlyph{ '0': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, '1': {Pixels: [][]byte{{1, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, '2': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {1, 1, 1}, {1, 0, 0}, {1, 1, 1}}}, '3': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, '4': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {0, 0, 1}}}, '5': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, '6': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '7': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}}}, '8': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '9': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {0, 0, 1}}}, 'a': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, 'b': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 0, 1}, {1, 1, 1}}}, 'c': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'd': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'e': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}, {0, 1, 1}}}, 'f': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}, {1, 0, 0}}}, 'g': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}}}, 'h': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, 'i': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, 'j': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {1, 1, 0}}}, 'k': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'l': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'm': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'n': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'o': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'p': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 0}}}, 'q': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {1, 0, 1}, {1, 1, 0}, {0, 1, 1}}}, 'r': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}}}, 's': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {0, 0, 1}, {1, 1, 0}}}, 't': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'u': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'v': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 0}}}, 'w': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 1, 1}}}, 'x': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {0, 1, 0}, {0, 1, 0}, {1, 0, 1}}}, 'y': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {1, 1, 0}}}, 'z': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 0, 0}, {1, 1, 1}}}, 'A': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'B': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 1, 1}}}, 'C': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'D': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, 'E': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, 'F': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 0, 0}}}, 'G': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}}}, 'H': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'I': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, 'J': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 0}}}, 'K': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'L': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 1, 1}}}, 'M': {Pixels: [][]byte{{1, 1, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'N': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'O': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'P': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 0}, {1, 0, 0}}}, 'Q': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}, {0, 1, 1}}}, 'R': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'S': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 1, 0}}}, 'T': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'U': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'V': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 0}}}, 'W': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 1, 1}}}, 'X': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'Y': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, 'Z': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, ' ': {Pixels: [][]byte{{0, 0, 0}}}, '!': {Pixels: [][]byte{{0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}}}, '"': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '#': {Pixels: [][]byte{{1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, '$': {Pixels: [][]byte{{1, 1, 1}, {1, 1, 0}, {0, 1, 1}, {1, 1, 1}, {0, 1, 0}}}, '%': {Pixels: [][]byte{{1, 0, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 0, 1}}}, '&': {Pixels: [][]byte{{1, 1, 0}, {1, 1, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '\'': {Pixels: [][]byte{{0, 1, 0}, {0, 1, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '(': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 0}}}, ')': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 1, 0}}}, '*': {Pixels: [][]byte{{1, 0, 1}, {0, 1, 0}, {1, 1, 1}, {0, 1, 0}, {1, 0, 1}}}, '+': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {1, 1, 1}, {0, 1, 0}, {0, 0, 0}}}, ',': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 1, 0}, {1, 0, 0}}}, '-': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {0, 0, 0}}}, '.': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 1, 0}}}, '/': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}}}, ':': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}, {0, 0, 0}}}, ';': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}, {1, 0, 0}}}, '<': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, '=': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}}}, '>': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}}}, '?': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 1}, {0, 0, 0}, {0, 1, 0}}}, '@': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 0}, {0, 1, 1}}}, '[': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 1, 0}}}, '\\': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 0, 1}}}, ']': {Pixels: [][]byte{{0, 1, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 1, 1}}}, '^': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '_': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}}}, '`': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '{': {Pixels: [][]byte{{0, 1, 1}, {0, 1, 0}, {1, 1, 0}, {0, 1, 0}, {0, 1, 1}}}, '|': {Pixels: [][]byte{{0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, '}': {Pixels: [][]byte{{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {0, 1, 0}, {1, 1, 0}}}, '~': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 1}, {1, 1, 1}, {1, 0, 0}, {0, 0, 0}}}, '×': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {0, 0, 0}}}, '¿': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, '«': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 1}, {1, 1, 1}, {0, 1, 1}, {0, 0, 1}}}, '»': {Pixels: [][]byte{{1, 0, 0}, {1, 1, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}}}, '°': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 1, 0}, {0, 0, 0}, {0, 0, 0}}}, '·': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 1, 0}, {0, 0, 0}, {0, 0, 0}}}, '€': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {0, 1, 1}}}, '¦': {Pixels: [][]byte{{0, 1, 0}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}, {0, 1, 0}}}, '¢': {Pixels: [][]byte{{0, 1, 0}, {1, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 1, 0}}}, '£': {Pixels: [][]byte{{0, 1, 1}, {0, 1, 0}, {1, 1, 1}, {0, 0, 0}, {1, 1, 1}}}, }, }
View Source
var FontPico8Narrow = PixelFont{ FontName: "Pico8Narrow", Description: "Same as Pico8 but not monospace and therefore more dense", FixedWidth: false, FontSpacing: 1, LineHeight: 5, Glyphs: map[rune]PixelGlyph{ '0': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, '1': {Pixels: [][]byte{{1, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, '2': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {1, 1, 1}, {1, 0, 0}, {1, 1, 1}}}, '3': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, '4': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {0, 0, 1}}}, '5': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, '6': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '7': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}}}, '8': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '9': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {0, 0, 1}}}, 'a': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, 'b': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 1, 0}, {1, 0, 1}, {1, 1, 1}}}, 'c': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'd': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'e': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}, {0, 1, 1}}}, 'f': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}, {1, 0, 0}}}, 'g': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}}}, 'h': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, 'i': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, 'j': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {1, 1, 0}}}, 'k': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'l': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'm': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'n': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'o': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'p': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 0}}}, 'q': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {1, 0, 1}, {1, 1, 0}, {0, 1, 1}}}, 'r': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}}}, 's': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 1}, {1, 0, 0}, {0, 0, 1}, {1, 1, 0}}}, 't': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'u': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'v': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 0}}}, 'w': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 1, 1}}}, 'x': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {0, 1, 0}, {0, 1, 0}, {1, 0, 1}}}, 'y': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {1, 1, 0}}}, 'z': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 0, 0}, {1, 1, 1}}}, 'A': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'B': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 1, 1}}}, 'C': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'D': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, 'E': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, 'F': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 0, 0}}}, 'G': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {1, 0, 1}, {1, 1, 1}}}, 'H': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'I': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, 'J': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 0}}}, 'K': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'L': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 1, 1}}}, 'M': {Pixels: [][]byte{{1, 1, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'N': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'O': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'P': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 0}, {1, 0, 0}}}, 'Q': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}, {0, 1, 1}}}, 'R': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'S': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 0, 1}, {1, 1, 0}}}, 'T': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'U': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'V': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 0}}}, 'W': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 1, 1}}}, 'X': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'Y': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {1, 1, 1}}}, 'Z': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, ' ': {Pixels: [][]byte{{0, 0, 0}}}, '!': {Pixels: [][]byte{{1}, {1}, {1}, {0}, {1}}}, '"': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '#': {Pixels: [][]byte{{1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, '$': {Pixels: [][]byte{{1, 1, 1}, {1, 1, 0}, {0, 1, 1}, {1, 1, 1}, {0, 1, 0}}}, '%': {Pixels: [][]byte{{1, 0, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 0, 1}}}, '&': {Pixels: [][]byte{{1, 1, 0}, {1, 1, 0}, {0, 1, 1}, {1, 0, 1}, {1, 1, 1}}}, '\'': {Pixels: [][]byte{{1}, {1}, {0}, {0}, {0}}}, '(': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 0}}}, ')': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 1, 0}}}, '*': {Pixels: [][]byte{{1, 0, 1}, {0, 1, 0}, {1, 1, 1}, {0, 1, 0}, {1, 0, 1}}}, '+': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {1, 1, 1}, {0, 1, 0}, {0, 0, 0}}}, ',': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 1, 0}, {1, 0, 0}}}, '-': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {0, 0, 0}}}, '.': {Pixels: [][]byte{{0}, {0}, {0}, {0}, {1}}}, '/': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}}}, ':': {Pixels: [][]byte{{0}, {1}, {0}, {1}, {0}}}, ';': {Pixels: [][]byte{{0, 0, 0}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}, {1, 0, 0}}}, '<': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, '=': {Pixels: [][]byte{{0, 0, 0}, {1, 1, 1}, {0, 0, 0}, {1, 1, 1}, {0, 0, 0}}}, '>': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}}}, '?': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 1}, {0, 0, 0}, {0, 1, 0}}}, '@': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 0}, {0, 1, 1}}}, '[': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 1, 0}}}, '\\': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 0, 1}}}, ']': {Pixels: [][]byte{{0, 1, 1}, {0, 0, 1}, {0, 0, 1}, {0, 0, 1}, {0, 1, 1}}}, '^': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '_': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}}}, '`': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}}, '{': {Pixels: [][]byte{{0, 1, 1}, {0, 1, 0}, {1, 1, 0}, {0, 1, 0}, {0, 1, 1}}}, '|': {Pixels: [][]byte{{1}, {1}, {1}, {1}, {1}}}, '}': {Pixels: [][]byte{{1, 1, 0}, {0, 1, 0}, {0, 1, 1}, {0, 1, 0}, {1, 1, 0}}}, '~': {Pixels: [][]byte{{0, 0, 0}, {0, 0, 1}, {1, 1, 1}, {1, 0, 0}, {0, 0, 0}}}, '×': {Pixels: [][]byte{{0, 0, 0}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {0, 0, 0}}}, '¿': {Pixels: [][]byte{{0, 1, 0}, {0, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, '«': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 1}, {1, 1, 1}, {0, 1, 1}, {0, 0, 1}}}, '»': {Pixels: [][]byte{{1, 0, 0}, {1, 1, 0}, {1, 1, 1}, {1, 1, 0}, {1, 0, 0}}}, '°': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 1, 0}, {0, 0, 0}, {0, 0, 0}}}, '·': {Pixels: [][]byte{{0}, {0}, {1}, {0}, {0}}}, '€': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {0, 1, 1}}}, '¦': {Pixels: [][]byte{{1}, {1}, {0}, {1}, {1}}}, '¢': {Pixels: [][]byte{{0, 1, 0}, {1, 1, 1}, {1, 0, 0}, {1, 1, 1}, {0, 1, 0}}}, '£': {Pixels: [][]byte{{0, 1, 1}, {0, 1, 0}, {1, 1, 1}, {0, 0, 0}, {1, 1, 1}}}, }, }
View Source
var FontSlumbers = PixelFont{ FontName: "Slumbers", Description: "Slim (3x5) font with mathematical symbols and uppercase letters", FixedWidth: true, FontSpacing: 1, LineHeight: 5, Glyphs: map[rune]PixelGlyph{ '0': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 0}}}, '1': {Pixels: [][]byte{{0, 1, 0}, {1, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, '2': {Pixels: [][]byte{{1, 1, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, '3': {Pixels: [][]byte{{1, 1, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 1}, {1, 1, 0}}}, '4': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 0, 1}, {0, 0, 1}}}, '5': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {0, 0, 1}, {1, 1, 0}}}, '6': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 1}, {0, 1, 0}}}, '7': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, '8': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {0, 1, 0}}}, '9': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {0, 1, 1}, {0, 0, 1}, {1, 1, 0}}}, 'A': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'B': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 1, 0}}}, 'C': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {0, 1, 1}}}, 'D': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 0}}}, 'E': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, 'F': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 0}, {1, 1, 0}, {1, 0, 0}, {1, 0, 0}}}, 'G': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'H': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}}}, 'I': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 1}}}, 'J': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {1, 1, 0}}}, 'K': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'L': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 0, 0}, {1, 1, 1}}}, 'M': {Pixels: [][]byte{{1, 0, 1}, {1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'N': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}}}, 'O': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, 'P': {Pixels: [][]byte{{1, 1, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 0}, {1, 0, 0}}}, 'Q': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 1}}}, 'R': {Pixels: [][]byte{{1, 1, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'S': {Pixels: [][]byte{{0, 1, 1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {1, 1, 0}}}, 'T': {Pixels: [][]byte{{1, 1, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'U': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}}}, 'V': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {0, 1, 0}}}, 'W': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {1, 0, 1}, {1, 1, 1}, {1, 0, 1}}}, 'X': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 1, 0}, {1, 0, 1}, {1, 0, 1}}}, 'Y': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}, {0, 1, 0}, {0, 1, 0}, {0, 1, 0}}}, 'Z': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 1}}}, ' ': {Pixels: [][]byte{{0, 0}}}, '!': {Pixels: [][]byte{{1}, {1}, {1}, {0}, {1}}}, '"': {Pixels: [][]byte{{1, 0, 1}, {1, 0, 1}}}, '%': {Pixels: [][]byte{{1, 0, 1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 0, 1}}}, '\'': {Pixels: [][]byte{{1}, {1}}}, '(': {Pixels: [][]byte{{0, 1}, {1, 0}, {1, 0}, {1, 0}, {0, 1}}}, ')': {Pixels: [][]byte{{1, 0}, {0, 1}, {0, 1}, {0, 1}, {1, 0}}}, '*': {Pixels: [][]byte{{1, 0, 1}, {0, 1, 0}, {1, 0, 1}}}, '+': {Pixels: [][]byte{{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}, Offset: 1}, ',': {Pixels: [][]byte{{1}, {1}}, Offset: 4}, '-': {Pixels: [][]byte{{1, 1, 1}}, Offset: 2}, '.': {Pixels: [][]byte{{1}}, Offset: 4}, '/': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {1, 0, 0}}, Offset: 1}, ':': {Pixels: [][]byte{{1}, {0}, {1}}, Offset: 2}, ';': {Pixels: [][]byte{{1}, {0}, {1}, {1}}, Offset: 2}, '<': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}}, '=': {Pixels: [][]byte{{1, 1, 1}, {0, 0, 0}, {1, 1, 1}}, Offset: 1}, '>': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}}}, '?': {Pixels: [][]byte{{1, 1, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 0}, {0, 1, 0}}}, '[': {Pixels: [][]byte{{1, 1}, {1, 0}, {1, 0}, {1, 0}, {1, 1}}}, '\\': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}, Offset: 1}, ']': {Pixels: [][]byte{{1, 1}, {0, 1}, {0, 1}, {0, 1}, {1, 1}}}, '^': {Pixels: [][]byte{{0, 1, 0}, {1, 0, 1}}}, '_': {Pixels: [][]byte{{1, 1, 1}}, Offset: 4}, '`': {Pixels: [][]byte{{1, 0}, {0, 1}}}, '{': {Pixels: [][]byte{{0, 0, 1}, {0, 1, 0}, {1, 1, 0}, {0, 1, 0}, {0, 0, 1}}}, '|': {Pixels: [][]byte{{1}, {1}, {1}, {1}, {1}}}, '}': {Pixels: [][]byte{{1, 0, 0}, {0, 1, 0}, {0, 1, 1}, {0, 1, 0}, {1, 0, 0}}}, 'k': {Pixels: [][]byte{{1, 0, 0}, {1, 0, 0}, {1, 0, 1}, {1, 1, 0}, {1, 0, 1}}}, }, }
View Source
var Fonts fonts
Functions ¶
func ImageToRGB24Bytes ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientFromDevice ¶
func (*Client) ClearAllTextArea ¶
func (*Client) GetSendingAnimationPicID ¶
func (*Client) ResetSendingAnimationPicId ¶
func (*Client) SendAnimation ¶
func (*Client) SendDisplayList ¶
func (c *Client) SendDisplayList(elements ...DisplayListElement) error
func (*Client) SendText ¶
func (c *Client) SendText(id, x, y int, dir TextScrollDirection, font TextFont, width int, str string, speed int, color string, align TextAlignment) error
func (*Client) SetBrightness ¶
func (*Client) SetMirrorMode ¶
func (c *Client) SetMirrorMode(mirrorMode MirrorMode) error
func (*Client) SetRotation ¶
func (c *Client) SetRotation(deviceIp string, rotation RotationAngle) error
type Device ¶
type Device struct { DeviceName string `json:"DeviceName"` DeviceID int `json:"DeviceId"` DevicePrivateIP string `json:"DevicePrivateIP"` DeviceMAC string `json:"DeviceMac"` }
func FindDeviceByMac ¶ added in v0.4.0
func FindDevices ¶
type DisplayListElement ¶
type DisplayListElement struct { Id int `json:"TextId"` TextType TextType `json:"type"` X int `json:"x"` Y int `json:"y"` ScrollDirection TextScrollDirection `json:"dir"` Font int `json:"font"` Width int `json:"TextWidth"` Height int `json:"Textheight"` Text string `json:"TextString"` Speed int `json:"speed"` Color string `json:"color"` UpdateTime int `json:"update_time"` TextAlignment TextAlignment `json:"align"` }
type MirrorMode ¶
type MirrorMode int
const ( MirrorModeDisable MirrorMode = 0 MirrorModeEnable MirrorMode = 1 )
type PixelFont ¶ added in v0.3.0
type PixelFont struct { // The name of ththe font. FontName string // A short description of the font. Description string // This flag is true if the font has a fixed width, false otherwise. FixedWidth bool // The number of pixels added between each character. FontSpacing int // The height of the font. LineHeight int // A map which contains the pixel information for each rune. Glyphs map[rune]PixelGlyph }
This type represents a font.
type PixelGlyph ¶ added in v0.3.0
type PixelGlyph struct { // An offset of pixels that are empty from the top. Offset int // The array with rows/columns of pixels. Pixels [][]byte }
This type represents a glyph inside a font.
func (PixelGlyph) GetWidth ¶ added in v0.3.0
func (p PixelGlyph) GetWidth() int
func (PixelGlyph) Touches ¶ added in v0.3.0
func (rightGlyph PixelGlyph) Touches(leftGlyph PixelGlyph) bool
Checks if the glyph touches the other glyph on the left side. Touch means either a direct or a diagonal connection.
type RgbImage ¶ added in v0.2.0
func NewRgbImage ¶ added in v0.2.0
func (*RgbImage) DrawCharacter ¶ added in v0.2.0
func (*RgbImage) DrawCircle ¶ added in v0.4.1
func (*RgbImage) DrawCircleFilled ¶ added in v0.4.1
func (*RgbImage) DrawGlyph ¶ added in v0.3.0
func (img *RgbImage) DrawGlyph(glyph PixelGlyph, x, y int, color Color) int
func (*RgbImage) DrawPixelAtIndex ¶ added in v0.2.0
func (*RgbImage) DrawRectangle ¶ added in v0.2.0
func (*RgbImage) DrawRectangleFilled ¶ added in v0.2.0
type RotationAngle ¶
type RotationAngle int
const ( RotationNormal RotationAngle = 0 Rotation90 RotationAngle = 1 Rotation180 RotationAngle = 2 Rotation270 RotationAngle = 3 )
type TextAlignment ¶
type TextAlignment int
const ( TextAlignmentLeft TextAlignment = 1 TextAlignmentMiddle TextAlignment = 2 TextAlignmentRight TextAlignment = 3 )
type TextScrollDirection ¶
type TextScrollDirection int
const ( TextScrollDirectionLeft TextScrollDirection = 0 TextScrollDirectionRight TextScrollDirection = 1 )
type TextType ¶
type TextType int
const ( TextTypeTimeSecond TextType = 1 TextTypeTimeMinute TextType = 2 TextTypeTimeHour TextType = 3 TextTypeTimeAmPm TextType = 4 TextTypeTimeHourMinute TextType = 5 // hour:min TextTypeTimeHourMinuteSecond TextType = 6 // hour:min:sec TextTypeDateYear TextType = 7 TextTypeDateDay TextType = 8 TextTypeDateMonth TextType = 9 TextTypeDateMonthYear TextType = 10 // month-year TextTypeDateMonthNameDotDay TextType = 11 // month-name.day TextTypeDateWeekYear TextType = 12 // day:month:year ??? TextTypeDateDayName2Char TextType = 13 // weekday-"SU","MO","TU","WE","TH","FR","SA" TextTypeDateDayName3Char TextType = 14 // weekday-"SUN","MON","TUE","WED","THU","FRI","SAT" TextTypeDateDayNameFull TextType = 15 // weekday-"SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY" TextTypeDateMonthName3Char TextType = 16 // month-"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC" TextTypeWeatherTemp TextType = 17 // temperature + c/f TextTypeWeatherTodayMaxTemp TextType = 18 TextTypeWeatherTodayMinTemp TextType = 19 TextTypeWeatherName TextType = 20 // the weather TextTypeNoise TextType = 21 // the noise value TextTypeText TextType = 22 // a defined text TextTypeNetText TextType = 23 // an url that responds with a json including the "DispData" string element, eg:http://appin.divoom-gz.com/Device/ReturnCurrentDate?test=0 reponse {"DispData": "2022-01-22 13:51:56"} )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.