TftBmpFromSdRotate(sFileName As sStringParameter1, wX_Pos As wTftLibParameter2, wY_Pos As wTftLibParameter3, wAngleDeg As wTftLibParameter4, bTransparent As bTftLibParameter1, wAlphaColor As wTftLibParameter6, bInvert As bTftLibParameter2, bOverlay As bTftLibParameter3), Byte
Draws a BMP image from an SD card and rotates it counter-clockwise by the specified angle, optionally applying transparency, color inversion, and pixel overlay effects.
Rotations of 0°, 90°, 180°, and 270° use optimized, high-speed algorithms. All other angles use a generic rotation method.
|
Parameter |
Description |
|
sFileName |
BMP file name in 8.3 format, maximum 12 characters including the dot and extension. |
|
wX_Pos |
X-coordinate of the image’s lower-left corner. |
|
wY_Pos |
Y-coordinate of the image’s lower-left corner. |
|
wAngleDeg |
Rotation angle in degrees (counter-clockwise). |
|
bTransparent |
Transparency mode: |
|
wAlphaColor |
Alpha-key color used when transparency is enabled. |
|
bInvert |
Color inversion: |
|
bOverlay |
Pixel overlay mode: |
|
Value |
Meaning |
|
0 |
Success |
|
1 |
No response from SD card |
|
2 |
Card not formatted as FAT16 or FAT32 |
|
3 |
File not found |
|
4 |
File already in use |
|
5 |
Read/write error |
|
99 |
Image exceeds screen boundaries |
Important Notes:
Due to the FAT16/FAT32 sequential cluster read mechanism, this function uses forward-mapped rotation, which is slower and produces lower visual quality than backward-mapped rotation.
All other rotation routines in TFT Graphic Library 2 use backward mapping, which is faster and produces higher-quality results.
For best performance and quality, consider loading the image into a sprite buffer or FLASH memory (which allow random access) and then applying arbitrary-angle rotation using backward mapping.
Additional Notes:
Effect processing order: Transparency → Color Inversion → Overlay → Draw
Transparent drawing is slower because pixels are processed individually instead of in block mode.
Overlay effects are slower because each destination pixel must be read and written.
If the global TftPixelCheck flag is enabled:
Images completely outside the visible area are not drawn.
Partially visible images are clipped to screen boundaries.
For maximum performance when no rotation or effects are required, use TftBmpFromSd(), which is significantly faster.
Created with the Personal Edition of HelpNDoc: Full-featured EPub generator