TftBmpFromCodeRotate()

Library Description ›› System ››
Parent Previous Next

TftBmpFromCodeRotate(dwBmpAlias As dwTftLibParameter1, wX_Pos As wTftLibParameter2, wY_Pos As wTftLibParameter3, wAngleDeg As wTftLibParameter4, wBackground As wTftLibParameter5, bTransparent As bTftLibParameter1, wAlphaColor As wTftLibParameter6, bInvert As bTftLibParameter2, bOverlay As bTftLibParameter3), Byte


Renders a BMP image stored in program (FLASH) memory, rotates it counter-clockwise by a specified angle, and applies optional transparency, color inversion, and pixel-overlay effects.


dwBmpAlias – Symbolic name of the BMP image table stored in program memory.

wX_Pos – X-coordinate of the rotated image’s lower-left corner.

wY_Pos – Y-coordinate of the rotated image’s lower-left corner.

wAngleDeg – Rotation angle in degrees (CCW).

wBackground – Fill color for empty areas introduced by rotation.

bTransparent – Transparency mode:

0 – Normal rendering (no transparency)

1 – Skip pixels matching the alpha-key color

wAlphaColor – Alpha-key color used when transparency is enabled.

bInvert – Color inversion:

0 – Normal colors

1 – Invert colors

bOverlay – Pixel overlay/blending mode:

0 = NONE – Direct overwrite

1 = OR – Lightens overlapping areas

2 = AND – Keeps intersecting bits

3 = XOR – Highlights differences

4 = NAND – Inverted AND; bright overlaps

5 = NOR – Inverted OR; darker result

6 = XNOR – Keeps matching pixels

7 = ADD – Adds RGB values; bright blend

8 = SUB – Subtracts RGB values; dark blend

9 = AVG – Averages colors; soft blend

10 = SCR – Screen blend; bright highlights

11 = MUL – Multiply blend; darker result (Photoshop Multiply)

12 = CON – Contrast-enhancing non-linear mix


Result:

0 – Success

1 – Origin outside the visible display area

2 – BMP width or height is zero

4 – Image partially clipped outside the visible area


Notes:

Processing order: transparency → inversion → overlay → render.

Transparency mode is slower because every pixel must be evaluated individually.

Overlay modes are slower due to pixel read-modify-write operations.

When TftPixelCheck is enabled:

Images fully outside the visible area are skipped.

Images partially outside are clipped to display boundaries.

For maximum performance without effects, use TftBmpFromCode().

 

Created with the Personal Edition of HelpNDoc: Free help authoring environment