頭檔案:#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 ??
本文轉自fengyuzaitu 51CTO部落格,原文連結:http://blog.51cto.com/fengyuzaitu/1961384,如需轉載請自行聯系原作者