溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

AGG第十五課 agg::rounded_rect 渲染圓角矩形

發(fā)布時間:2020-07-28 19:41:00 來源:網(wǎng)絡(luò) 閱讀:715 作者:fengyuzaitu 欄目:系統(tǒng)運維

文件引用以及參數(shù)說明

頭文件:#include <agg_rounded_rect.h>

類構(gòu)造器:rounded_rect(double x1, double y1, doublex2, double y2, double r)

    矩形對角點的坐標(左上角和右下角的坐標)和圓角半徑

圓角半徑如果指定是0,繪制的是一個正規(guī)的矩形??!

例子(問題)

agg/examples/rounded_rect.cpp是一個圓角矩形的例子。其中不理解的地方就是subpixel offset,亞像素偏移

郵件的一個問題

I'm tring to get bounding rectangle of object and trind below code

 

// Round Rect

agg::rounded_rect r(0,0,width,height,0);

r.normalize_radius();

ras.add_path(r);

agg::render_scanlines_aa(ras, sl, renb,grad_alloc, grad_gen);

 

 

but I cann't call   r.bound_rect()

for what kinds of objects bound_rectfunction can be called ??


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI