FT800 Series Programmer Guide
Version 2.1
Document Reference No.: BRT_000030 Clearance No.: BRT#037
218
Copyright © Bridgetek Limited
5.39
CMD_NUMBER - draw a decimal number
C prototype
void cmd_number( int16_t x,
int16_t y,
int16_t font,
uint16_t options,
int32_t n );
Parameters
x
x-coordinate of text base, in pixels
y
y-coordinate of text base, in pixels
font
font to use for text, 0-31. See ROM and RAM Fonts
options
By default (x,y) is the top-left pixel of the text. OPT_CENTERX centers the
text horizontally, OPT_CENTERY centers it vertically. OPT_CENTER centers the
text in both directions. OPT_RIGHTX right-justifies the text, so that the x is
the rightmost pixel. By default the number is displayed with no leading
zeroes, but if a width 1-9 is specified in the options, then the number is
padded if necessary with leading zeroes so that it has the given width. If
OPT_SIGNED is given, the number is treated as signed, and prefixed by a
minus sign if negative.
n
The number to display, either unsigned or signed 32-bit