TftPrintBdfChar()

Library Description ›› Fonts ›› BDF ››
 visits
Parent Previous Next

Syntax

TftPrintBdfChar(bChar As Byte, swX_Pos As SWord, swY_Pos As SWord, wForeColor As Word, wBackColor As Word, pTransparent As Bit)

Parameters

Parameter

Description

bChar

The character to print.

swX_Pos

The absolute X-position of the character's lower-left corner.

swY_Pos

The absolute Y-position of the character's lower-left corner.

wForeColor

The 16-bit RGB565 color for the character (used for active pixels in the glyph).

wBackColor

The 16-bit RGB565 color for the background (used for empty pixels in the glyph box).

pTransparent

Whether to use transparency:
1: Yes (only active pixels are printed, preserving the background).
0: No (inactive pixels are filled with the background color).

Overview

Print character using BDF font.

Example

TftPrintBdfChar("G", 10, 10, WHITE, BLACK, 0)

Note: When transparency is used, the background color (wBackColor) is ignored, and only the active pixels of the glyph are printed. However, this approach is slower than using the background color.


Include "TftLib\Fonts\SND\F5_BDF_Sail-Regular-25.inc"

'....

TftSetUp(0, 0)

TftSetBdfFont(5)

TftResetScreen(BLUE)

TftPrintBdfChar("G", 10, 10, WHITE, BLACK, 0)

TftPrintBdfChar("G", 40, 40, WHITE, BLACK, 1)

TftPrintBdfChar()

Created with the Personal Edition of HelpNDoc: Transform Your Help Documentation Process with a Help Authoring Tool