mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 12:25:12 +03:00
Lua lcd.drawLine was not OK when (x1=x2 and y1>y2) or (y1=y2 and x1>x2)
This commit is contained in:
parent
7cfb1b24a1
commit
7e0c78e2b7
1 changed files with 2 additions and 2 deletions
|
@ -124,11 +124,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+1 : y2-y1-1, flags);
|
lcdDrawSolidVerticalLine(x1, y2 >= y1 ? y1 : y1+1, y2 >= y1 ? y2-y1+1 : y2-y1-1, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (y1 == y2) {
|
else if (y1 == y2) {
|
||||||
lcdDrawSolidHorizontalLine(x1, y1, x2 >= x1 ? x2-x1+1 : x2-x1-1, flags);
|
lcdDrawSolidHorizontalLine(x2 >= x1 ? x1 : x1+1, y1, x2 >= x1 ? x2-x1+1 : x2-x1-1, flags);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue