mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:27:43 +00:00
LibGUI: Dither pattern should be independent from clipping rectangle
The dither pattern needs to be determined relative to the bitmap itself, not the clipping rectangle. Fixes #8780
This commit is contained in:
parent
30af999431
commit
1021aba226
1 changed files with 1 additions and 1 deletions
|
@ -155,7 +155,7 @@ void Painter::fill_rect_with_dither_pattern(const IntRect& a_rect, Color color_a
|
|||
|
||||
for (int i = 0; i < rect.height(); ++i) {
|
||||
for (int j = 0; j < rect.width(); ++j) {
|
||||
bool checkboard_use_a = (i & 1) ^ (j & 1);
|
||||
bool checkboard_use_a = ((rect.left() + i) & 1) ^ ((rect.top() + j) & 1);
|
||||
if (checkboard_use_a && !color_a.alpha())
|
||||
continue;
|
||||
if (!checkboard_use_a && !color_b.alpha())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue