class documentation

A class to manage the desktop environment for the display.

Method __del__ Cleanup resources
Method __init__ Initialize the desktop environment.
Method clear Clear the display with the background color.
Method draw Draw the desktop environment with a BMP image from disk.
Method draw_header Draw the header with the board name and Wi-Fi status.
Method set_battery Set the battery level on the header.
Method set_time Set the time on the header.
Instance Variable background_color Undocumented
Instance Variable battery_level_str Undocumented
Instance Variable battery_pos Undocumented
Instance Variable bluetooth_pos Undocumented
Instance Variable bluetooth_size Undocumented
Instance Variable display Undocumented
Instance Variable draw_icons Undocumented
Instance Variable font_size_x Undocumented
Instance Variable has_wifi Undocumented
Instance Variable is_circular Undocumented
Instance Variable is_dark_mode Undocumented
Instance Variable name Undocumented
Instance Variable name_pos Undocumented
Instance Variable position Undocumented
Instance Variable size Undocumented
Instance Variable text_color Undocumented
Instance Variable time_pos Undocumented
Instance Variable time_str Undocumented
Instance Variable wifi_pos Undocumented
Instance Variable wifi_size Undocumented
def __del__(self):

Cleanup resources

def __init__(self, draw, text_color: int = 65535, background_color: int = 0):

Initialize the desktop environment.

Parameters
draw:DrawThe drawing context.
text_color:intThe text color. Defaults to 0xFFFF.
background_color:intThe background color. Defaults to 0x0000.
def clear(self):

Clear the display with the background color.

def draw(self, animiation_frame, animation_size: Vector, position: Vector = Vector(0, 20)):

Draw the desktop environment with a BMP image from disk.

Parameters
animiation_frameThe animation frame pixel data to draw.
animation_size:VectorThe size of the animation frame.
position:VectorThe position to draw the frame. Defaults to Vector(0, 20).
def draw_header(self, wifi_is_connected: bool = True):

Draw the header with the board name and Wi-Fi status.

Parameters
wifi_is_connected:boolWhether Wi-Fi is connected. Defaults to True.
def set_battery(self, battery_level: int):

Set the battery level on the header.

Parameters
battery_level:intThe battery level as a percentage.
def set_time(self, time_str: str):

Set the time on the header.

Parameters
time_str:strThe time string to display.
background_color =

Undocumented

battery_level_str =

Undocumented

battery_pos =

Undocumented

bluetooth_pos =

Undocumented

bluetooth_size =

Undocumented

display =

Undocumented

draw_icons =

Undocumented

font_size_x =

Undocumented

has_wifi =

Undocumented

is_circular =

Undocumented

is_dark_mode =

Undocumented

name =

Undocumented

name_pos =

Undocumented

position =

Undocumented

size =

Undocumented

text_color =

Undocumented

time_pos =

Undocumented

time_str =

Undocumented

wifi_pos =

Undocumented

wifi_size =

Undocumented