Tsev > Xov xwm > Ntsiab lus

CMD-TOGGLE - Kos Ib Toggle Hloov

Apr 27, 2019

image

C daim ntawv prototype

tsis muaj dabtsis cmd_toggle (int16_t x,

int16_t y,

int16_t w,

int16_t font,

uint16_t xaiv,

uint16_t xeev,

const char * s);

Cov lus qhia

x

x-coordinate ntawm sab saum toj-sab ntawm toggle, hauv pixels

y

y-coordinate ntawm sab saum toj-sab ntawm toggle, hauv pixels

w

dav ntawm toggle, hauv pixels

font

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

kev xaiv

Los ntawm vim lub toggle yog twv nrog 3D effect thiab cov nqi ntawm cov kev xaiv no

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

lub xeev

lub xeev ntawm lub toggle: 0 yog tawm, 65535 yog nyob rau.

S

Txoj hlua ntaus cim rau toggle. Tus cim ua cim ntawm 255 (hauv C nws tuaj yeem sau ua lus xff)

cais ob daim ntawv lo.

Kev piav qhia

Cov ntsiab lus ntawm lub cev dimension yog

 Cov sab nrauv sab nrauv (r) yog qhov siab qhov siab * (10/16) pixel

 Knob radius yog (r-1.5) pixels, qhov r yog sab nraud radius saum toj no

 Qhov chaw ntawm sab nraud lub taub hau ntawm sab laug yog ntawm (x, y + r / 2) tswj hwm

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

image

image

image

image