Versions in this module Expand all Collapse all v0 v0.4.2 May 8, 2024 Changes in this version type Color + func (c Color) ToHex() string v0.4.1 May 3, 2024 Changes in this version type RgbImage + func (img *RgbImage) DrawCircle(centerX, centerY int, radius int, borderColor Color) + func (img *RgbImage) DrawCircleFilled(centerX, centerY int, radius int, borderColor Color, fillColor Color) v0.4.0 Apr 24, 2024 Changes in this version + var Colors colors type Device + func FindDeviceByMac(mac string) (*Device, error) v0.3.1 Apr 23, 2024 v0.3.0 Apr 23, 2024 Changes in this version + var FontPico8 = PixelFont + var FontPico8Narrow = PixelFont + var FontSlumbers = PixelFont + var Fonts fonts + type PixelFont struct + Description string + FixedWidth bool + FontName string + FontSpacing int + Glyphs map[rune]PixelGlyph + LineHeight int + type PixelGlyph struct + Offset int + Pixels [][]byte + func (p PixelGlyph) GetWidth() int + func (rightGlyph PixelGlyph) Touches(leftGlyph PixelGlyph) bool type RgbImage + func (i *RgbImage) SaveToPng(path string, scale int) error + func (image *RgbImage) DrawGlyph(glyph PixelGlyph, x, y int, color Color) int v0.2.2 Apr 20, 2024 v0.2.1 Apr 20, 2024 Changes in this version type RgbImage + Data []byte v0.2.0 Apr 20, 2024 Changes in this version + var ColorAqua = Color + var ColorBlack = Color + var ColorBlue = Color + var ColorGreen = Color + var ColorMagenta = Color + var ColorRed = Color + var ColorWhite = Color + var ColorYellow = Color + type Color struct + B byte + G byte + R byte + func NewColor(r, g, b byte) Color + type RgbImage struct + Height int + Width int + func NewRgbImage(width, height int) *RgbImage + func (image *RgbImage) Clear() + func (image *RgbImage) DrawCharacter(character rune, x, y int, color Color) + func (image *RgbImage) DrawImage(x, y int, img image.Image) + func (image *RgbImage) DrawLine(startX, startY int, endX, endY int, color Color) + func (image *RgbImage) DrawPixel(x, y int, color Color) + func (image *RgbImage) DrawPixelAtIndex(index int, color Color) + func (image *RgbImage) DrawRectangle(left, top int, right, bottom int, borderColor Color) + func (image *RgbImage) DrawRectangleFilled(left, top int, right, bottom int, borderColor Color, fillColor Color) + func (image *RgbImage) DrawText(text string, x, y int, color Color, alignment TextAlignment) + func (image *RgbImage) Fill(color Color) v0.1.0 Apr 16, 2024 Changes in this version + var ErrInvalidBrightness = fmt.Errorf("brightness should be in range of 0-100") + func ImageToRGB24Bytes(img image.Image) []byte + type Client struct + func NewClient(deviceIp string) *Client + func NewClientFromDevice(d *Device) *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 Device struct + DeviceID int + DeviceMAC string + DeviceName string + DevicePrivateIP string + func FindDevices() ([]*Device, error) + func (d *Device) GetClient() *Client + type DisplayListElement struct + Color string + Font int + Height int + Id int + ScrollDirection TextScrollDirection + Speed int + Text string + TextAlignment TextAlignment + TextType TextType + UpdateTime int + Width int + X int + Y int + type MirrorMode int + const MirrorModeDisable + const MirrorModeEnable + type RotationAngle int + const Rotation180 + const Rotation270 + const Rotation90 + const RotationNormal + type TextAlignment int + const TextAlignmentLeft + const TextAlignmentMiddle + const TextAlignmentRight + type TextFont int + const TextFont0 + const TextFont1 + const TextFont2 + const TextFont3 + const TextFont4 + const TextFont5 + const TextFont6 + const TextFont7 + type TextScrollDirection int + const TextScrollDirectionLeft + const TextScrollDirectionRight + type TextType int + const TextTypeDateDay + const TextTypeDateDayName2Char + const TextTypeDateDayName3Char + const TextTypeDateDayNameFull + const TextTypeDateMonth + const TextTypeDateMonthName3Char + const TextTypeDateMonthNameDotDay + const TextTypeDateMonthYear + const TextTypeDateWeekYear + const TextTypeDateYear + const TextTypeNetText + const TextTypeNoise + const TextTypeText + const TextTypeTimeAmPm + const TextTypeTimeHour + const TextTypeTimeHourMinute + const TextTypeTimeHourMinuteSecond + const TextTypeTimeMinute + const TextTypeTimeSecond + const TextTypeWeatherName + const TextTypeWeatherTemp + const TextTypeWeatherTodayMaxTemp + const TextTypeWeatherTodayMinTemp