Functions for drawing horizontal lines may not have an int8_t width argument or the max size will be 127 when 128 is needed.

This commit is contained in:
bsongis
2012-01-05 17:59:54 +00:00
parent 29cc8a3529
commit 5fbec8a513
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -296,10 +296,9 @@ void lcd_plot(uint8_t x,uint8_t y, uint8_t att)
lcd_mask(p, BITMASK(y%8), att);
}
void lcd_hlineStip(int8_t x, uint8_t y, int8_t w, uint8_t pat, uint8_t att)
void lcd_hlineStip(int8_t x, uint8_t y, uint8_t w, uint8_t pat, uint8_t att)
{
if (y >= DISPLAY_H) return;
if (w<0) { x+=w; w=-w; }
if (x<0) { w+=x; x=0; }
if (x+w > DISPLAY_W) { w = DISPLAY_W - x; }
@@ -318,7 +317,7 @@ void lcd_hlineStip(int8_t x, uint8_t y, int8_t w, uint8_t pat, uint8_t att)
}
}
void lcd_hline(uint8_t x,uint8_t y, int8_t w, uint8_t att)
void lcd_hline(uint8_t x, uint8_t y, uint8_t w, uint8_t att)
{
lcd_hlineStip(x, y, w, 0xff, att);
}