Projectkk2glider/issue 4449 drawline (#4464)

* Gtest pattern changed

* Fixes #4449: lcdDrawLine_line() was wrong for slanted lines [128x64]

* Fixes #4449: lcdDrawLine_line() was wrong for slanted lines [480x272]

* lcdDrawLine() coordinates check moved to Lua API
This commit is contained in:
Damjan Adamic
2017-02-16 00:23:42 +01:00
committed by Bertrand Songis
parent 53f55f8e1d
commit ee43d3fb97
7 changed files with 53 additions and 42 deletions
-2
View File
@@ -420,8 +420,6 @@ void lcdDrawSolidHorizontalLine(coord_t x, coord_t y, coord_t w, LcdFlags att)
#if !defined(BOOT)
void lcdDrawLine(coord_t x1, coord_t y1, coord_t x2, coord_t y2, uint8_t pat, LcdFlags att)
{
if (lcdIsPointOutside(x1, y1) || lcdIsPointOutside(x2, y2)) return;
int dx = x2-x1; /* the horizontal distance of the line */
int dy = y2-y1; /* the vertical distance of the line */
int dxabs = abs(dx);