1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-21 18:20:47 +01:00

Do the hillshading in alpha layer only

This commit is contained in:
Martin Tůma 2024-02-26 10:27:58 +01:00
parent f3bb7ada9a
commit af7696bfd7

View File

@ -85,7 +85,7 @@ QImage HillShading::render(const Matrix &m, quint8 alpha, double z,
pixel = 0; pixel = 0;
else { else {
quint8 val = (L < 0) ? 0 : L * alpha; quint8 val = (L < 0) ? 0 : L * alpha;
pixel = alpha<<24 | val<<16 | val<<8 | val; pixel = (alpha - val)<<24;
} }
*(quint32*)(bits + (y - 1) * bpl + (x - 1) * 4) = pixel; *(quint32*)(bits + (y - 1) * bpl + (x - 1) * 4) = pixel;