feat: Sleep screen letterbox fill and image upscaling
Add configurable letterbox fill for sleep screen cover images that don't match the display aspect ratio. Four fill modes are available: Solid (single dominant edge shade), Blended (per-pixel edge colors), Gradient (edge colors interpolated toward white/black), and None. Enable upscaling of cover images smaller than the display in Fit mode by modifying drawBitmap/drawBitmap1Bit to support both up and downscaling via a unified block-fill approach. Edge sampling data is cached to .crosspoint alongside the cover BMP to avoid redundant bitmap scanning on subsequent sleeps. Cache is validated against screen dimensions and auto-regenerated when stale. New settings: Letterbox Fill (None/Solid/Blended/Gradient) and Gradient Direction (To White/To Black). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "../Activity.h"
|
||||
|
||||
class Bitmap;
|
||||
@@ -13,6 +15,6 @@ class SleepActivity final : public Activity {
|
||||
void renderDefaultSleepScreen() const;
|
||||
void renderCustomSleepScreen() const;
|
||||
void renderCoverSleepScreen() const;
|
||||
void renderBitmapSleepScreen(const Bitmap& bitmap) const;
|
||||
void renderBitmapSleepScreen(const Bitmap& bitmap, const std::string& edgeCachePath = "") const;
|
||||
void renderBlankSleepScreen() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user