TftPrintSndDecimal(fDec As Float, bSigDigits As Byte, bDecDigits 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)
|
Parameter |
Description |
|
fDec |
signed decimal value to print |
|
bSigDigits |
number of significant digits to print |
bDecDigits — number of decimal digits to print
bFontSize — font size
wX_Pos — x position (absolute) for the lower-left corner of the character
wY_Pos — y position (absolute) 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 - used for the glyph pixels
wBackColor — background color in 16-bit RGB565 format - used for empty pixels within the glyph's bounding box
pTransparent — transparency option
Prints a signed decimal using an SND font.
TftPrintSndDecimal(-12345.678, 7, 4, 2, 1, 1, 0, WHITE, BLACK, 0)
-Background color (wBackColor) will be ignored if transparency is enabled, and only the pixels from the glyph will be printed.
However, this method is slower than using a background color.
-For further clarification on parameter usage, check TftPrintBdfDecimal() and TftPrintSndString().
|
$define FontSmooth 0 $define FontMaxSpace 16 $define FontMaxPixels 16 Include "TftLib\Fonts\SND\F28_SND_24x32_Basic_Inconsola.inc" Include "TftLib\Fonts\SND\F29_SND_24x32_Basic_Ubuntu.inc" Include "TftLib\TFT_Graphic_Lib.inc" '... TftSetUp(0, 0) TftResetScreen(BLACK) TftSetSndFont(28,0) TftPrintSndDecimal(-12345.678, 7, 4, 1, 0, 0, 1, RED, BLUE, 0) TftPrintSndDecimal(-12345.678, 0, 4, 1, 0, 1, 1, RED, BLUE, 0) TftPrintSndDecimal(-12345.678, 0, 2, 1, 0, 2, 1, RED, BLUE, 1) TftSetSndFont(29,0) TftPrintSndDecimal(-12345.678, 6, 2, 1, 0, 3, 1, RED, BLUE, 1) TftPrintSndDecimal(12345.678, 0, 4, 1, 0, 4, 1, RED, BLUE, 1) |
|
Created with the Personal Edition of HelpNDoc: Easy Qt Help documentation editor