欢迎光临
我们一直在努力

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

文件引用以及参数说明

头文件:#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 ??

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。