info@panadisplay.com
Pib Kos Duab A Graphics Primitive Mus Ntxiv

Pib Kos Duab A Graphics Primitive Mus Ntxiv

Apr 26, 2019

image

Cov lus qhia

Tsis muaj

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

Tsis muaj


image

Cov lus qhia

Tsis muaj

Kev piav qhia

Nws raug pom zoo kom muaj ib qho END rau txhua qhov BEGIN. Whereas cov neeg siv tau zoo

tsis txhob siv cov kev pab ntawm END kom txuag tau cov lus qhia ntxiv hauv daim ntawv sau qhia

RAM.

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

TSWV


image

Cov lus qhia

dest

Muab cov npe chaw nyob kom dhia dhia.

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

HU


image

Cov lus qhia

dav

Kab dav hauv 1/16 pixel. Tus nqi pib yog 16.

Kev piav qhia

Poob qhov dav ntawm kos kab. Qhov dav yog qhov deb ntawm qhov chaw ntawm txoj kab

cov txheej xwm sab nrauv pixel, hauv cov koog 1/16 pixel. Qhov siv tau yog los ntawm 16 txog 4095

nyob rau hauv cov nqe lus ntawm 1 / 16th pixel units.

Thov nco ntsoov tias LINE_WIDTH cov lus txib yuav cuam tshuam rau LINES, LINE_STRIP, RECTS,

EDGE_STRIP_A / B / R / L primitives.

Piv txwv

Qhov thib ob kab yog kos nrog ib tug dav ntawm 80, rau ib tug 5 pixel voos kheej-kheej:

image

Cov ntsiab lus graphics

Tus nqi ntawm dav yog ib feem ntawm cov ntsiab lus teb kos duab, raws li tau hais tseg hauv tshooj 4.1

Saib kuj

Tsis muaj


image

Cov lus qhia

m

Macro sau npe los nyeem. Tus nqi 0 txhais tau hais tias FT800 yuav nqa qhov kev txib

los ntawm REG_MACRO_0 rau kev coj. Tus nqi 1 txhais tau hais tias lub FT800 yuav los nqa

command ntawm Reg_MACRO_1 rau txim tuag. Cov ntsiab lus ntawm REG_MACRO_0 los yog

REG_MACRO_1 yuav tsum muaj cov lus hais qhia siv tau, txwv tsis pub tus cwj pwm

yog undefined.

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

Tsis muaj


image

Cov lus qhia

qhov loj

Tawm kaum sab xis ntawm 1/16 pixel. Tus nqi pib yog 16.

Kev piav qhia

Poob qhov loj ntawm cov ntsiab lus kos. Qhov dav yog qhov deb ntawm qhov chaw ntawm qhov point

mus rau sab nraud kos pixel, hauv cov koog 1/16 pixels. Qhov siv tau yog los ntawm 16 mus rau

8191 nrog rau lub tsev 1 / 16th pixel.

Piv txwv

Qhov thib ob taw tes yog kos nrog ib tug dav ntawm 160, rau ib tug 10 pixel vojvoog:

image

Cov ntsiab lus graphics

Tus nqi ntawm qhov loj me yog ib feem ntawm cov ntsiab lus duab, raws li tau hais tseg hauv seem 4.1

Saib kuj

Tsis muaj


image

Cov lus qhia

Tsis muaj

Kev piav qhia

Muab cov ntsiab lus tshiab coj los ua dua tshiab, raws li tau piav qhia hauv tshooj 4.1. Plaub (4) theem ntawm

SAVE thiab RESTORE muaj nyob hauv FT800. RESTORE_CONTEXT ntxiv

ntsaws qhov default values rau cov ntsiab lus teb tam sim no.

Piv txwv

Txuag thiab txum kho cov ntsiab lus txhais tau hais tias tus thib ob 'G' yog kos hauv liab, tsis yog

xiav:

image

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

SAVE_CONTEXT


image

Cov lus qhia

Tsis muaj

Kev piav qhia

HU thiab RETURN muaj 4 theem ntawm cov teebmeem ntxiv rau tus pointer tam sim no. Yam

ntxiv HUV / rov qab ua tiav yuav ua rau tus cwj pwm tsis txaj muag.

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

HU


image

Cov lus qhia

Tsis muaj

Kev piav qhia

Muab cov ntsiab lus teeb tsa tam sim no, raws li tau hais tseg hauv seem 4.1. Ib qho ntxiv

SAVE_CONTEXT yuav muab pov tseg cov ntsiab lus teb tau tshaj plaws.

Piv txwv

Txuag thiab txum kho cov ntsiab lus txhais tau hais tias tus thib ob 'G' yog kos hauv liab, tsis yog

xiav:

image

Cov ntsiab lus graphics

Tsis muaj

Saib kuj

RESTORE_CONTEXT


image

Cov lus qhia

dav

Qhov dav ntawm daim duab qes duab clip, hauv pixels. Tus nqi pib yog 512.

Tus nqi siv tau yog ntawm 0 txog 512.

qhov siab

Qhov siab ntawm daim duab qis duab clip, hauv pixels. Tus nqi pib yog 512.

Tus nqi siv tau yog ntawm 0 txog 512.

Kev piav qhia

Poob qhov dav thiab qhov siab ntawm cov duab plaub sab thawv rau plaub, uas txwv cov kev kos duab.

Piv txwv

Teem ib 40 x 30 tus duab plaub sab nrauv clips qhov tseeb thiab qhov kawg ntawm daim duab:

image

Cov ntsiab lus graphics

Qhov tseem ceeb ntawm dav thiab qhov siab yog ib feem ntawm cov ntsiab lus teb graphics 4.1

Saib kuj

Tsis muaj


image

Cov lus qhia

x

Tus x koom ntawm cov duab plaub ntawm daim txiag plaub, hauv pixels. Tus nqi pib yog 0

y

Y txoj hauj lwm ntawm daim duab qev plaub dub, hauv pixels. Tus nqi pib yog 0

Kev piav qhia

Poob saum toj kawg nkaus ntawm txoj kab ntawm daim duab plaub hau, uas txwv cov duab kos.

Piv txwv

Teem ib 40 x 30 tus duab plaub sab nrauv clips qhov tseeb thiab qhov kawg ntawm daim duab:

image

Cov ntsiab lus graphics

Qhov tseem ceeb ntawm x thiab y yog ib feem ntawm cov ntsiab lus teb graphics 4.1

Saib kuj

Tsis muaj

image

Cov lus qhia

func

Qhia meej txog kev ua haujlwm, ib qho ntawm TSIS TXHOB, TSIS TAU, LOSSIS, TSWV YIM NEEG, RAWS,

SIV, LUS CEEB TOOM, lossis TXHUA. Tus nqi pib yog ALWAYS. Txog tus nqi

ntawm cov kev tuaj yeem siv, thov khij Tshawb 8: Lub constants ntawm ALPHA_FUNC

ref

Teev tus nqi siv rau qhov kev xeem stencil. Tus nqi pib yog 0

daim npog qhov ncauj

Ntaus lub npog ntsej muag uas yog Anded nrog tus nqi siv thiab cov stencil cia

nqi. Tus nqi pib yog 255

Kev piav qhia

Kev xeem Stencil tsis lees txais lossis lees txais pixels nyob ntawm seb qhov kev sim ua qhov twg

sau tseg hauv func parameter, uas ua hauj lwm rau qhov tam sim no tus nqi nyob rau hauv lub stencil tsis tuaj

tiv thaiv tus nqi siv.

Piv txwv

Kos ob lub ntsiab lus, incrementing stencil ntawm txhua lub pixel, ces kos lub pixels nrog tus nqi

2 nyob rau hauv liab:

image

Cov ntsiab lus graphics

Qhov tseem ceeb ntawm func, ref thiab daim npog qhov ncauj yog ib feem ntawm cov ntsiab lus teb, raws li tau piav qhia hauv

Tshooj 4.1

Saib kuj

STENCIL_OP, STENCIL_MASK

image

Cov lus qhia

daim npog qhov ncauj

Lub npog ntsej muag uas siv los pab sau ntawv cov khoom nplais. Tus nqi pib yog 255

Cov ntsiab lus graphics

Tus nqi ntawm lub npog ncauj yog ib feem ntawm cov ntsiab lus duab, raws li tau hais tseg hauv seem 4.1

Saib kuj

STENCIL_FUNC, STENCIL_OP, TAG_MASK