TftInvOverAreaRect(wOriginX As wTftLibParameter1, wOriginY As wTftLibParameter2, wAreaWidth As wTftLibParameter3, wAreaHeight As wTftLibParameter4, bOverlay As bTftLibParameter1, OverlayColor As wTftLibParameter5)
Invert pixels and apply a pixel overlay effect using a specified overlay color within a defined rectangular area on the TFT screen.
Parameters:
wOriginX - X coordinate of the bottom-left corner of the area to be inverted and overlaid
wOriginY - Y coordinate of the bottom-left corner of the area to be inverted and overlaid
wAreaWidth - Width of the region to be inverted and overlaid
wAreaHeight - Height of the region to be inverted and overlaid
bOverlay — Pixel overlay effect:
0 = NONE – No overlay; direct pixel replacement
1 = OR – Lightens overlapping areas (bitwise OR); merges bright regions
2 = AND – Keeps only common bits; intersection-style effect
3 = XOR – Highlights differences; toggles pixels where colors differ
4 = NAND – Inverts the intersection; brightens overlap zones
5 = NOR – Inverts the union; produces darker overlays
6 = XNOR – Preserves pixels where both values match; strong masking effect
7 = ADD – Adds color values; brightens overlapping regions (light addition)
8 = SUB – Subtracts color values; darkens overlapping regions (shadow-like effect)
9 = AVG – Averages color values; produces a soft blending effect
10 = SCR – Screen blend (inverse multiply); brightens highlights
11 = MUL – Multiply blend; darkens overlapping areas (similar to Photoshop “Multiply”)
12 = CON – Contrast blend; enhances midtones using a non-linear mix
wOverlayColor - Overlay color value used when the selected overlay effect is applied
Notes:
The inversion and overlay operations are relatively slow, as they require reading and rewriting each pixel within the target area.
If the global TftPixelCheck flag is enabled, boundary checking is performed:
If the defined area lies completely outside the visible screen, no inversion or overlay is applied.
If the area is partially outside the screen, it is clipped to the visible display boundaries.
Created with the Personal Edition of HelpNDoc: Save time and frustration with HelpNDoc's WinHelp HLP to CHM conversion feature