TftSetUp(bOrientation As Byte)
bOrientation = Origin and Direction
0 = Width x Height
1 = Height x Width
2 = Width x Height (inverse)
3 = Height x Width (inverse)
This command sets the initial orientation of the TFT screen according to bOrientation and loads the corresponding IC driver.
By default, the width is considered the larger dimension (e.g., 320x240), so Width = 320 and Height = 240.
Example:
TftSetUp(0)
This setup should only be called at the beginning of the program.
The TFT screen orientation can be dynamically changed at any point during the program. The graphic library always operates in the first quadrant (i.e., positive X to the right and Y upwards). Changing the orientation alters which corner of the screen is considered the origin (0,0). This command demonstrates how the same string would be printed with four different screen orientations.
TftSetUp(0) TftResetScreen(BLACK) TftPrintSndString("(0;0)",1,1,1,1,GREEN,BLACK,0) TftLineHNG(2,240,2,GREEN,RED) TftPrintSndChar("X",1,245,2,0,RED,BLACK,0) TftLineVNG(2,2,160,GREEN,BLUE) TftPrintSndChar("Y",1,2,165,0,BLUE,BLACK,0) 'TftBmpFromSD("dog.bmp",10,20) TftBmpFromSD("dog.bmp",80,40) |
|
|
Created with the Personal Edition of HelpNDoc: Easily Add Encryption and Password Protection to Your PDFs