TftOverTransAreaRect()

Library Description ›› System ››
 visits
Parent Previous Next

Syntax

TftOverTransAreaRect(wOriginX As wTftLibParameter1, wOriginY As wTftLibParameter2, wAreaWidth As wTftLibParameter3, wAreaHeight As wTftLibParameter4, wAlpColor As wTftLibParameter5, bOverlay As bTftLibParameter1, wOverColor As wTftLibParameter6)

Overview

Apply bitwise pixel processing with an overlay color to a defined rectangular area on the TFT screen, while also supporting a transparent layer.

Parameters

Parameter

Description

wOriginX

X-coordinate of the bottom-left corner of the area to be processed.

wOriginY

Y-coordinate of the bottom-left corner of the area to be processed.

wAreaWidth

Width of the rectangular region to apply the overlay effect to.

wAreaHeight

Height of the rectangular region to apply the overlay effect to.

wAlpColor

Alpha color value used when transparent processing is enabled. Pixels matching this color are skipped.

bOverlay

Pixel overlay effect mode:
0 = NONE – No overlay; direct pixel replacement.
1 = OR – Lightens overlapping areas (adds bits); 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; creates darker overlays.
6 = XNOR – Keeps pixels unchanged where both match; strong masking effect.
7 = ADD – Adds color values; brightens overlapping regions (light addition).
8 = SUB – Subtracts color values; darkens overlaps (shadow-like effect).
9 = AVG – Averages colors; 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.

wOverColor

Overlay color value used for bitwise pixel processing.

Notes

The overlay operation is relatively slow, as it requires reading, modifying, and rewriting each pixel within the target area.

When the global TftPixelCheck flag is enabled, boundary checks are performed:

If the defined area lies completely outside the visible screen, no operation is performed.

If the area is partially outside the visible screen, it is clipped to the valid screen boundaries before processing.

Created with the Personal Edition of HelpNDoc: Converting Word Docs to eBooks Made Easy with HelpNDoc