Fix the label corruption issue
All checks were successful
Build ptprnt / build (push) Successful in 4m43s
All checks were successful
Build ptprnt / build (push) Successful in 4m43s
This commit is contained in:
@@ -86,6 +86,20 @@ class FakePrinter : public ::ptprnt::IPrinterDriver {
|
||||
*/
|
||||
graphics::Bitmap<graphics::ALPHA8> simulatePrinting(const graphics::MonochromeData& data);
|
||||
|
||||
/**
|
||||
* @brief Save bitmap to PNG file using Cairo
|
||||
* @param bitmap The bitmap to save
|
||||
* @param filename Output filename
|
||||
* @return true if successful
|
||||
*/
|
||||
bool saveBitmapToPng(const graphics::Bitmap<graphics::ALPHA8>& bitmap, const std::string& filename) const;
|
||||
|
||||
/**
|
||||
* @brief Generate timestamped filename for fake label output
|
||||
* @return Filename like "fakelabel_20231011_123456.png"
|
||||
*/
|
||||
std::string generateTimestampedFilename() const;
|
||||
|
||||
std::unique_ptr<graphics::Bitmap<graphics::ALPHA8>> mLastPrint;
|
||||
bool mHasAttachedDevice = false;
|
||||
PrinterStatus mStatus{.tapeWidthMm = 12}; // Default to 12mm tape
|
||||
|
||||
Reference in New Issue
Block a user