Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SPI_TFT TFT_fonts Touch_tft mbed
Revision 1:a9641f372bea, committed 2013-04-17
- Comitter:
- RorschachUK
- Date:
- Wed Apr 17 18:14:12 2013 +0000
- Parent:
- 0:a954bd7fd162
- Commit message:
- Added a preview rectangle and corrected a calculation.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Apr 13 19:27:43 2013 +0000
+++ b/main.cpp Wed Apr 17 18:14:12 2013 +0000
@@ -100,7 +100,8 @@
//Set new centre and zoom
p = tt.to_pixel(p);
centrex += (2.0 * p.x - WIDTH) / (zoom * WIDTH);
- centrey += (2.0 * p.y - HEIGHT) / (zoom * HEIGHT);
+ centrey += (2.0 * p.y - HEIGHT) / (zoom * WIDTH);
zoom *= 4.0;
+ tt.rect(p.x - WIDTH / 8.0, p.y - HEIGHT / 8.0, p.x + WIDTH / 8.0, p.y + HEIGHT / 8.0, Yellow);
}
}
\ No newline at end of file