new function

This commit is contained in:
Geoffray Levasseur committed 2026-11-03 16:01:54 +01:00
1 parent 72b08a830d
commit 4944243acb
2 files changed
+16

No files matched your search

+11
View File
@@ -47,6 +47,17 @@ GraphicSet *Templates = nullptr;
Dpi::Bitmap *Colors = nullptr;
Dpi::Bitmap *bigImp = nullptr;
Dpi::Bitmap paper;
Dpi::Bitmap drawBuffer;
void drawBufferEnsureSize(int width, int height)
{
if (drawBuffer.width() >= width && drawBuffer.height() >= height)
return;
drawBuffer.setSize(std::max(drawBuffer.width(), width), std::max(drawBuffer.height(), height));
drawBuffer.canvas().begin();
drawBuffer.canvas().fillRect(QRect(0, 0, drawBuffer.width(), drawBuffer.height()));
drawBuffer.canvas().end();
}
QColor colorFromDelphi(int value)
{