1
0
Fork 0

(svn r3349) Fix off-by-one error in drawing matrix widget, from r3181.

release/0.4.5
peter1138 2005-12-28 08:39:43 +00:00
parent 7e5da7d8b2
commit 37c3cd2e5b
1 changed files with 4 additions and 4 deletions

View File

@ -232,13 +232,13 @@ void DrawWindowWidgets(const Window *w)
color = _color_list[wi->color & 0xF].window_color_bgb; color = _color_list[wi->color & 0xF].window_color_bgb;
x = r.left; x = r.left;
for (ctr = c; ctr > 0; ctr--) { for (ctr = c; ctr > 1; ctr--) {
x += amt1; x += amt1;
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color); GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
} }
x = r.top; x = r.top;
for (ctr = d; ctr > 0; ctr--) { for (ctr = d; ctr > 1; ctr--) {
x += amt2; x += amt2;
GfxFillRect(r.left + 1, x, r.right - 1, x, color); GfxFillRect(r.left + 1, x, r.right - 1, x, color);
} }
@ -246,13 +246,13 @@ void DrawWindowWidgets(const Window *w)
color = _color_list[wi->color&0xF].window_color_1b; color = _color_list[wi->color&0xF].window_color_1b;
x = r.left - 1; x = r.left - 1;
for (ctr = c; ctr > 0; ctr--) { for (ctr = c; ctr > 1; ctr--) {
x += amt1; x += amt1;
GfxFillRect(x, r.top + 1, x, r.bottom - 1, color); GfxFillRect(x, r.top + 1, x, r.bottom - 1, color);
} }
x = r.top - 1; x = r.top - 1;
for (ctr = d; ctr > 0; ctr--) { for (ctr = d; ctr > 1; ctr--) {
x += amt2; x += amt2;
GfxFillRect(r.left+1, x, r.right-1, x, color); GfxFillRect(r.left+1, x, r.right-1, x, color);
} }