agg::rounded_rect绘制圆角矩形

1 文件引用以及参数说明

头文件:#include <agg_rounded_rect.h>

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

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

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

2 例子回放(问题)

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

4 邮件的一个问题

I'm tring to get bounding rectangle ofobject 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 ??


你可能感兴趣的:(agg)