//画左边白色大半圆
ras.reset();
agg::arc arc(400, 100, 100, 100, 1.57, -1.57,false);
ras.add_path(arc);
ras.move_to_d(400,0);
ras.line_to_d(400,200);
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(255,255,255));
ras.reset();
agg::arc arc1(400, 100, 100, 100, 1.57, -1.57,true);
ras.add_path(arc1);
ras.edge_d(400,0,400,200);
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(0,0,0));
//绘制上面的白色小半圆
ras.reset();
agg::arc arc2(400, 50, 50, 50, 1.57, -1.57,true);
ras.add_path(arc2);
ras.auto_close(true);
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(255,255,255));
//绘制下面的黑色小半圆
ras.reset();
agg::arc arc3(400, 150, 50, 50, 1.57, -1.57,false);
ras.add_path(arc3);
ras.close_polygon();
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(0,0,0));
//绘制上面的黑色太极眼
ras.reset();
agg::ellipse ell(400,50,10,10);
ras.add_path(ell);
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(0,0,0));
//绘制下面的白色太极眼
ras.reset();
agg::ellipse ell1(400,150,10,10);
ras.add_path(ell1);
agg::render_scanlines_aa_solid(ras,sl,renb,agg::rgba8(255,255,255));
多说一句: ras.close_polygon(); ras.auto_close(true); ras.edge_d(400,0,400,200);都是用来封闭半弧的,然后才能够填充颜色!!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。