AGG第四十課SVG使用的三種管道

The current version of SVG contains 3 pipelines:

創(chuàng)新互聯(lián)建站長期為1000多家客戶提供的網(wǎng)站建設(shè)服務(wù),團(tuán)隊(duì)從業(yè)經(jīng)驗(yàn)10年,關(guān)注不同地域、不同群體,并針對不同對象提供差異化的產(chǎn)品和服務(wù);打造開放共贏平臺,與合作伙伴共同營造健康的互聯(lián)網(wǎng)生態(tài)環(huán)境。為大觀企業(yè)提供專業(yè)的成都做網(wǎng)站、網(wǎng)站制作,大觀網(wǎng)站改版等技術(shù)服務(wù)。擁有10年豐富建站經(jīng)驗(yàn)和眾多成功案例,為您定制開發(fā)。

Simple polygons:

path_storage ->

 conv_curve -> 

  conv_transform ->

   conv_clip

Strokes:

path_storage ->

 conv_curve -> 

  conv_stroke ->

   conv_transform ->

    conv_clip

Contoured polygons:

path_storage ->

 conv_curve -> 

  conv_contour ->

   conv_transform ->

    conv_clip

> And is it doubly calculated for

> filling, then stroking (in

> case both apply)?

It is. Otherwise you would have to store the

intermediate result somewhere. But the good news is

that conv_curve works pretty fast, at least stroking

and clipping are much more time consuming tasks. 

The only obvious case when we can approximate the

curves in the last step is drawing text. But again,

when it's without stroking/outlining/contouring.

>  Also what exactly does conv_contour do?

Exactly half of the work conv_stroke does. :-) It

dilates or erodes polygons depending on the sign of

the width. I used it to eliminate the defects when

joining anti-aliased polygons:/upload/otherpic60/188328.jpg> I hope you dont mind all these questions :)

Of course I don't. Afterall I myself started cooking

this porridge :-)

> If so, doesnt this give the same result each time,

> as its done before the

> conv_transform? 

Yes, it does, at least seems to do :-)

But the reality is more complex. Here's a

contadiction. Yes, we could transform paths before

approximating them with line segments. But conv_stroke

and conv_contour require already decomposed path. So,

the only case we can use this order (conv_transform ->

conv_curve) is a simple filled polygon without a

"border". But the situation is even worse. I use

conv_clip that performs polygonal clipping. Such kind

of a "vectorial" clipping can work with line segments

only, so, the curves must be decomposed before

clipping. Ideally it would be fine to decompose curves

as late as possible, but if the order of the

conversions is different solid and stroked paths will

be inconsistent:/upload/otherpic60/188345.jpgEventually I decided to set my jaw and to convert the

curves in the first pipeline step. Well, this is the

whole idea of the custom pipelines - in certain cases

you can use different conversion order for the sake of

performance.

本文標(biāo)題:AGG第四十課SVG使用的三種管道
分享網(wǎng)址:http://bm7419.com/article10/jcshdo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)全網(wǎng)營銷推廣、域名注冊、響應(yīng)式網(wǎng)站企業(yè)網(wǎng)站制作、動(dòng)態(tài)網(wǎng)站

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)