1
0

Fix GBOX clipping

This commit is contained in:
otya128
2016-12-24 17:26:59 +09:00
parent 0f5656e152
commit 6d08094f5a

View File

@@ -897,7 +897,7 @@ class Graphic2 : Graphic
{ {
for (int x = sx; x <= ex; x++) for (int x = sx; x <= ex; x++)
{ {
if (x >= wa.x && y >= wa.y && x < cx2 && y < cy2) if (x >= wa.x && y >= wa.y && x <= cx2 && y <= cy2)
buffer[y * height + x] = color; buffer[y * height + x] = color;
} }
} }
@@ -907,7 +907,7 @@ class Graphic2 : Graphic
{ {
for (int y = sy; y <= ey; y++) for (int y = sy; y <= ey; y++)
{ {
if (x >= wa.x && y >= wa.y && x < cx2 && y < cy2) if (x >= wa.x && y >= wa.y && x <= cx2 && y <= cy2)
buffer[y * width + x] = color; buffer[y * width + x] = color;
} }
} }