Modified to work with two displays
Dependents: touch2 default CANary_9341_test CANary_merge
Fork of SPI_TFT by
Revision 12:ff509eb02e37, committed 2013-04-07
- Comitter:
- TickTock
- Date:
- Sun Apr 07 08:27:03 2013 +0000
- Parent:
- 11:c39d5b3745af
- Child:
- 13:4ad7de7d2220
- Commit message:
- sped up line draw;
Changed in this revision
SPI_TFTx2.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/SPI_TFTx2.cpp Fri Mar 15 04:27:48 2013 +0000 +++ b/SPI_TFTx2.cpp Sun Apr 07 08:27:03 2013 +0000 @@ -694,22 +694,23 @@ dx = x1-x0; dy = y1-y0; - if (dx == 0) { /* vertical line */ - if (y1 > y0) vline(x0,y0,y1,color); - else vline(x0,y1,y0,color); - return; - } + // vline and hline are very slow for some reason so not using + //if (dx == 0) { /* vertical line */ + // if (y1 > y0) vline(x0,y0,y1,color); + // else vline(x0,y1,y0,color); + // return; + //} if (dx > 0) { dx_sym = 1; } else { dx_sym = -1; } - if (dy == 0) { /* horizontal line */ - if (x1 > x0) hline(x0,x1,y0,color); - else hline(x1,x0,y0,color); - return; - } + //if (dy == 0) { /* horizontal line */ + // if (x1 > x0) hline(x0,x1,y0,color); + // else hline(x1,x0,y0,color); + // return; + //} if (dy > 0) { dy_sym = 1;