Tsev > Xov xwm > Ntsiab lus

CMD_PROGRESS - Kos Aas Bar

Apr 27, 2019

image

C daim ntawv prototype

void cmd_progress (int16_t x,

int16_t y,

int16_t w,

int16_t h,

uint16_t xaiv,

uint16_t val,

uint16_t ntau);

Cov lus qhia

x

x-koom ntawm kev ua tiav sab saum toj-sab laug, hauv pixels

y

y-coordinate ntawm kev ua tiav sab saum toj-sab laug, hauv pixels

w

dav ntawm kev kawm bar, hauv pixels

h

qhov siab ntawm txoj kev kawm nce qib, hauv pixels

kev xaiv

Los ntawm kev sib txawv ntawm qhov kev kawm tiav yog kos nrog cov nyhuv 3D thiab cov nqi ntawm cov kev xaiv

yog xoom. Kev xaiv OPT_FLAT tshem tawm cov nyhuv 3D thiab nws tus nqi yog 256

val

Cov khoom muaj nqis ntawm qhov kev kawm tau nce, ntawm 0 thiab ntau ntu

ntau

Tus nqi siab tshaj plaws

Kev piav qhia

Cov ntsiab lus ntawm lub cev qhov ntev yog

 x, y, w, h muab cov txheej txheem loj ntawm txoj kev kawm tiav. Radius ntawm bar (r) yog

min (w, h) / 2

 Kab xev ntawm txoj kab ke sab hauv yog r * (7/8)

Xa mus rau cov tshuab hluav taws xob cav cov voj voog ntawm lub cev kom paub ntxiv.

image

image

image