TftPrintSndString(sString As sTftString, bFontSize As Byte, wX_Pos As Word, wY_Pos As Word, pPosition As Bit, wForeColor As Word, wBackColor As Word, pTransparent As Bit)
sString = null-terminated string to print (up to 72 characters)
bFontSize = font size
• 0 or 1 = nominal size
• 2, 3, 4, ... = multiples of the nominal size
wX_Pos = x position for the lower left corner of the first character
wY_Pos = y position for the lower left corner of the first character
pPosition = position type for the lower left corner of the character
• 0 = absolute, actual pixel position on the TFT screen (e.g., wX_Pos = 152, wY_Pos = 86)
• 1 = relative, based on the virtual division of the TFT screen into columns and rows (calculated by FontPixels and FontSpace) (e.g., wX_Pos = 5, wY_Pos = 2; with FontPixels = 8 and FontSpace = 9, the actual position would be x = 5 * 8 = 40; y = 2 * 9 = 18)
wForeColor = character color in 16-bit RGB565 format - used to set pixels forming the glyph
wBackColor = background color in 16-bit RGB565 format - empty pixels within the glyph's bounding box will use this color
pTransparent = transparency option
• 1 = Yes (use transparency)
• 0 = No (use background color)
Print string using SND font.
Example:
TftPrintSndString("TEST", 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) TftSetSndFont(2,0) TftResetScreen(BLUE) TftPrintSndString("Hello!", 1, 10, 10, 0, WHITE, BLACK, 0) TftPrintSndString("Hello!", 1, 120, 13, 0, WHITE, BLACK, 1) TftPrintSndString("Hello!", 1, 1, 2, 1, WHITE, BLACK, 0) TftPrintSndString("Hello!", 1, 8, 2, 1, WHITE, BLACK, 1) TftPrintSndString("Hello!", 2, 0, 2, 1, WHITE, BLACK, 0) TftPrintSndString("Hello!", 2, 0, 3, 1, WHITE, BLACK, 1) TftSetSndFont(2,1) TftPrintSndString("Hello!", 2, 0, 4, 1, WHITE, BLACK, 0) TftPrintSndString("Hello!", 2, 0, 5, 1, WHITE, BLACK, 1) |
Created with the Personal Edition of HelpNDoc: Generate Kindle eBooks with ease