TftPrintSndChar()

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

Syntax

TftPrintSndChar(bChar As Byte, bFontSize As Byte, wX_Pos As Word, wY_Pos As Word, pPosition As Bit, wForeColor As Word, wBackColor As Word, pTransparent As Bit)

Parameters

Parameter

Description

bChar

character to print

bFontSize

font size

Overview

wX_Pos — x position for the lower left corner of the character

wY_Pos — y position for the lower left corner of the character

pPosition — position type for the lower left corner of the character

wForeColor — character color in 16-bit RGB565 format - this color will be used to set pixels for the glyph

wBackColor — background color in 16-bit RGB565 format - empty pixels in the glyph’s bounding box will use this color

pTransparent — transparency option

Print character using SND font.

Example

TftPrintSndChar("G", 2, 1, 1, 0, WHITE, BLACK, 0)

Note: If transparency is enabled, the background color (wBackColor) will be ignored, and only the pixels of the glyph will be printed. However, this is slower than using a background color.


$define FontSmooth          1

$define FontMaxSpace        16

$define FontMaxPixels       16

Include "TftLib\Fonts\SND\F2_SND_16x16_Basic.inc"

'....

TftSetUp(0, 0)

TftSetSndFont(2,0)

TftResetScreen(BLUE)

TftPrintSndChar("G", 1, 10, 10, 0, WHITE, BLACK, 0)

TftPrintSndChar("G", 1, 40, 10, 0, WHITE, BLACK, 1)

TftPrintSndChar("G", 1, 1, 1, 1, WHITE, BLACK, 0)

TftPrintSndChar("G", 1, 3, 1, 1, WHITE, BLACK, 1)

TftPrintSndChar("G", 2, 1, 2, 1, WHITE, BLACK, 0)

TftPrintSndChar("G", 2, 3, 2, 1, WHITE, BLACK, 1)

TftSetSndFont(2,1)

TftPrintSndChar("G", 2, 5, 2, 1, WHITE, BLACK, 0)

TftPrintSndChar("G", 2, 8, 2, 1, WHITE, BLACK, 1)

TftSetSndFont(2,0)

TftPrintSndChar("G", 3, 0, 3, 1, WHITE, BLACK, 0)

TftPrintSndChar("G", 3, 1, 3, 1, WHITE, BLACK, 1)

TftSetSndFont(2,1)

TftPrintSndChar("G", 3, 2, 3, 1, WHITE, BLACK, 0)

TftPrintSndChar("G", 3, 3, 3, 1, WHITE, BLACK, 1)

TftPrintSndChar()

Created with the Personal Edition of HelpNDoc: Maximize Your PDF Protection with These Simple Steps