Bug fix for drawing boxes of size 3x3 pixels

This commit is contained in:
inmarket 2017-11-07 17:47:55 +10:00
parent 37732af0b5
commit 87ec4b7c77

View File

@ -2963,11 +2963,11 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
g->p.color = color;
if (cx - x > 2) {
if (cx - x >= 2) {
g->p.x = x; g->p.y = y; g->p.x1 = cx; hline_clip(g);
if (y != cy) {
g->p.x = x; g->p.y = cy; g->p.x1 = cx; hline_clip(g);
if (cy - y > 2) {
if (cy - y >= 2) {
y++; cy--;
g->p.x = x; g->p.y = y; g->p.y1 = cy; vline_clip(g);
g->p.x = cx; g->p.y = y; g->p.y1 = cy; vline_clip(g);