TftOverlayAreaRect()

Library Description ›› System ››
Parent Previous Next

TftOverlayAreaRect(wOriginX As wTftLibParameter1, wOriginY As wTftLibParameter2, wAreaWidth As wTftLibParameter3, wAreaHeight As wTftLibParameter4, bOverlay As bTftLibParameter1, wOverlayColor As wTftLibParameter5)


Apply pixel overlay processing 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 overlay area

wOriginY – Y coordinate of the bottom-left corner of the overlay area

wAreaWidth – Width of the region to which the overlay is applied

wAreaHeight – Height of the region to which the overlay is applied

bOverlay – Pixel overlay effect to apply:

0 = NONE – No overlay; direct pixel replacement

1 = OR – Lightens overlapping areas by combining bits; merges bright regions

2 = AND – Keeps only common bits; intersection-style effect

3 = XOR – Highlights differences by toggling differing pixels

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 source and destination colors; 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 for the selected pixel processing mode


Notes:

The overlay operation is relatively slow, as it requires 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 overlay operation is applied.

If the area is partially outside the screen, it is automatically clipped to the visible boundaries.

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