final ports and first fixes

This commit is contained in:
Geoffray Levasseur committed 2026-11-04 11:55:54 +01:00
1 parent 77690cbd96
commit 6f3556009a
23 files changed
+2302 -41

No files matched your search

+13
View File
@@ -956,6 +956,19 @@ void paintLogo(Dpi::Canvas &canvas, int x, int y, QColor lightColor, QColor shad
canvas.copyRect(QRect(x, y, logo->width, logo->height), drawBuffer.canvas(), QRect(0, 0, logo->width, logo->height));
}
void darkenImage(Dpi::Bitmap &bitmap, int change)
{
QImage &image = bitmap.image();
for (int y = 0; y < image.height(); ++y) {
for (int x = 0; x < image.width(); ++x) {
const QRgb c = image.pixel(x, y);
image.setPixel(x, y,
qRgba(std::max(qRed(c) - change, 0), std::max(qGreen(c) - change, 0),
std::max(qBlue(c) - change, 0), qAlpha(c)));
}
}
}
namespace {
bool ornamentInitialized = false;
}