TftPrintBdfInteger()

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

Syntax

TftPrintBdfInteger(sdInteger As SDword, bDigits As Byte, wX_Pos As Word, wY_Pos As Word, wForeColor As Word, wBackColor As Word, pTransparent As Bit)

Parameters

Parameter

Description

sdInteger

The signed integer value to print.

bDigits

The number of significant digits to print:

Overview

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

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

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

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

pTransparent — Whether to use transparency:

Prints a signed integer using a BDF font.

Example

TftPrintBdfInteger(-12345, 7, 1, 1, WHITE, BLACK, 0)

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

For specific formatting, you can use Positron’s Str$ functions to format the integer as a string and then print it using TftPrintBdfString()


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

'....

TftSetUp(0, 0)

TftSetBdfFont(5)

TftResetScreen(BLUE)

TftPrintBdfInteger(-12345, 0, 10, 10, WHITE, BLACK, 1)

TftPrintBdfInteger(-12345, 7, 10, 40, WHITE, BLACK, 1)

TftPrintBdfInteger(-12345, 3, 10, 70, WHITE, BLACK, 1)

TftPrintBdfInteger(8765, 0, 10, 100, WHITE, BLACK, 0)

TftPrintBdfInteger(8765, 8, 10, 130, WHITE, BLACK, 0)

TftPrintBdfInteger(8765, 3, 10, 160, WHITE, BLACK, 0)

TftPrintBdfInteger()

Created with the Personal Edition of HelpNDoc: Free PDF documentation generator