TftBmpMemNameRotate()

Library Description ›› Memory ››
… visits
Parent Previous Next

Syntax

TftBmpMemNameRotate(sFileName As sStringParameter1, 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

Overview

Loads and renders a BMP file from FLASH memory by name, rotates it counter-clockwise by the specified angle, and applies optional transparency, color inversion, and pixel-overlay effects.

Parameters

Parameter

Description

sFileName

BMP filename (max 12 characters plus dot/extension).

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 the unused areas created 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 effect:
0 = NONE – Direct overwrite
1 = OR – Lightens overlaps (adds bits)
2 = AND – Keeps intersecting bits
3 = XOR – Highlights differences
4 = NAND – Inverted AND (bright overlap)
5 = NOR – Inverted OR (darker)
6 = XNOR – Keeps matching pixels
7 = ADD – Adds RGB values (bright result)
8 = SUB – Subtracts RGB values (dark result)
9 = AVG – Averages colors (soft blend)
10 = SCR – Screen blend (inverse multiply; bright highlights)
11 = MUL – Multiply blend (darker, Photoshop-style Multiply)
12 = CON – Contrast mix (non-linear enhancement)

Return value

Value

Meaning

0

Success

1

Origin outside the visible area

2

BMP width or height is zero

3

File not found

4

Image was partially clipped outside the visible area

Notes

Processing order: transparency → inversion → overlay → render.

Transparency mode is slower because every pixel requires inspection.

Overlay modes are slower because each destination pixel must be read and rewritten.

When TftPixelCheck is enabled:

Images entirely off-screen are skipped.

Images partially off-screen are clipped to display boundaries.

Created with the Personal Edition of HelpNDoc: Make Documentation Review a Breeze with HelpNDoc's Advanced Project Analyzer