Tsev > Xov xwm > Ntsiab lus

CMD-TEXT - kos ntawv

Apr 27, 2019

image

C daim ntawv prototype

tsis muaj dabtsis cmd_text (int16_t x,

int16_t y,

int16_t font,

uint16_t xaiv,

const char * s);

Cov lus qhia

x

x-kab ke ntawm cov ntaub ntawv pib, hauv pixels

y

y-coordinate ntawm cov ntaub ntawv paus, hauv pixels

font

Font siv rau cov ntawv nyeem, 0-31. Saib ROM thiab RAM Fonts

kev xaiv

Los ntawm kev ua neej (x, y) yog sab saum toj-pixel ntawm cov ntawv nyeem thiab cov nqi ntawm cov kev xaiv

xoom. OPT_CENTERX chaw cov ntawv nyeem horizontally, OPT_CENTERY cov chaw nws

vertically. OPT_CENTER sau cov lus nyob hauv ob qho tib si. OPT_RIGHTX

txoj cai-justifies cov ntawv nyeem, kom tus x yog rightmost pixel. Tus nqi ntawm

OPT_RIGHTX yog 2048.

Cov ntawv nyeem

Cov ntawv nyeem txoj hlua nws tus kheej uas yuav tsum raug txiav tawm los ntawm kev ua cim tsis txaus siab