Vizic Technologies
/
SimplePaint_SG2
Simple Paint Demo - MBED + SmartGPU2 board
Revision 6:b7a024b9fc2d, committed 2014-04-18
- Comitter:
- emmanuelchio
- Date:
- Fri Apr 18 01:30:02 2014 +0000
- Parent:
- 5:2318aa0508db
- Commit message:
- SmartGPU2 SimplePaint_SG2 demo- Please select(uncomment) your smartGPU2 board under SMARTGPU2.h file before compiling!!!
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2318aa0508db -r b7a024b9fc2d main.cpp --- a/main.cpp Fri Apr 18 01:21:17 2014 +0000 +++ b/main.cpp Fri Apr 18 01:30:02 2014 +0000 @@ -32,18 +32,19 @@ POINT point; NUMBEROFBYTES bytes; + initializeSmartGPU2(); lcd.baudChange(BAUD6); // Set a fast baud!, always that we use touch functions is recommended to use fast baud rates //front cover lcd.setTextColour(YELLOW); lcd.setTextSize(FONT4); - lcd.string(85,50,MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Mini Paint",&bytes); + lcd.string(LCD_WIDTH/8,LCD_HEIGHT/4,MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Mini Paint",&bytes); lcd.setTextColour(BLUE); lcd.setTextSize(FONT3); - lcd.string(70,95,MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Touch on corner \nto erase screen",&bytes); + lcd.string(LCD_WIDTH/6,LCD_HEIGHT/2,MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Touch on corner \nto erase screen",&bytes); lcd.setTextColour(MAGENTA); lcd.setTextSize(FONT2); - lcd.string(50,170,MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Touch screen to begin",&bytes); + lcd.string(LCD_WIDTH/8,MAX_Y_LANDSCAPE-(LCD_HEIGHT/3),MAX_X_LANDSCAPE,MAX_Y_LANDSCAPE,"Touch screen to begin",&bytes); while(lcd.touchScreen(&point)==INVALID); // Wait for a touch on the screen to start lcd.erase();