Merge pull request #4630 from craftandtheory/horiz_vert_drawline
LUA horizontal and vertical lcd.drawLine(...) fix
This commit is contained in:
@@ -119,11 +119,11 @@ static int luaLcdDrawLine(lua_State *L)
|
|||||||
|
|
||||||
if (pat == SOLID) {
|
if (pat == SOLID) {
|
||||||
if (x1 == x2) {
|
if (x1 == x2) {
|
||||||
lcdDrawSolidVerticalLine(x1, y1<y2 ? y1 : y2, y1<y2 ? y2-y1 : y1 - y2, flags);
|
lcdDrawSolidVerticalLine(x1, y1<y2 ? y1 : y2, y1<y2 ? (y2-y1)+1 : (y1-y2)+1, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (y1 == y2) {
|
else if (y1 == y2) {
|
||||||
lcdDrawSolidHorizontalLine(x1<x2 ? x1:x2, y1, x1<x2 ? x2-x1 : x1-x2, flags);
|
lcdDrawSolidHorizontalLine(x1<x2 ? x1 : x2, y1, x1<x2 ? (x2-x1)+1 : (x1-x2)+1, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user