温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

AGG第十五课 agg::rounded_rect 渲染圆角矩形

发布时间:2020-07-28 19:41:00 来源:网络 阅读:624 作者:fengyuzaitu 栏目:系统运维

文件引用以及参数说明

头文件:#include <agg_rounded_rect.h>

类构造器:rounded_rect(double x1, double y1, doublex2, double y2, double r)

    矩形对角点的坐标(左上角和右下角的坐标)和圆角半径

圆角半径如果指定是0,绘制的是一个正规的矩形!!

例子(问题)

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问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI