mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
* Update digital clock draw to auto scale to correct size; no more fixed scaling * Static scale calcuation to improve performance * Update src/graphics/draw/ClockRenderer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Back off for width or height exceeds * Fixes for some calcuations --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
31 lines
983 B
C++
31 lines
983 B
C++
#pragma once
|
|
|
|
#include <OLEDDisplay.h>
|
|
#include <OLEDDisplayUi.h>
|
|
|
|
namespace graphics
|
|
{
|
|
|
|
/// Forward declarations
|
|
class Screen;
|
|
|
|
namespace ClockRenderer
|
|
{
|
|
|
|
// Clock frame functions
|
|
void drawAnalogClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
|
void drawDigitalClockFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
|
|
|
// Segmented display functions
|
|
void drawSegmentedDisplayCharacter(OLEDDisplay *display, int x, int y, uint8_t number, float scale = 1);
|
|
void drawSegmentedDisplayColon(OLEDDisplay *display, int x, int y, float scale = 1);
|
|
void drawHorizontalSegment(OLEDDisplay *display, int x, int y, int width, int height);
|
|
void drawVerticalSegment(OLEDDisplay *display, int x, int y, int width, int height);
|
|
|
|
// UI elements for clock displays
|
|
// void drawWatchFaceToggleButton(OLEDDisplay *display, int16_t x, int16_t y, bool digitalMode = true, float scale = 1);
|
|
|
|
} // namespace ClockRenderer
|
|
|
|
} // namespace graphics
|