AGG lesson 24 rendering Taiji Diagram
/ / draw a large white semicircle on the left
Ras.reset ()
Agg::arc arc (400,100,100,100,1.57,-1.57 false)
Ras.add_path (arc)
Ras.move_to_d (400 and 0)
Ras.line_to_d (400200)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))
Ras.reset ()
Agg::arc arc1 (400,100,100,1.57,-1.57)
Ras.add_path (arc1)
Ras.edge_d (4004.0400200)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (0J 0J 0))
/ / draw the small white semicircle above
Ras.reset ()
Agg::arc arc2 (400,50,50,50,1.57,-1.57)
Ras.add_path (arc2)
Ras.auto_close (true)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))
/ / draw the small black semicircle below
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 (0J 0J 0))
/ / draw the black Taiji eye above
Ras.reset ()
Agg::ellipse ell (400, 50, 10, 10)
Ras.add_path (ell)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (0J 0J 0))
/ / draw the white Taiji eye below
Ras.reset ()
Agg::ellipse ell1 (400, 150, 150, 10, 10)
Ras.add_path (ell1)
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255255255))
One more sentence: ras.close_polygon (); ras.auto_close (true); ras.edge_d (4000.400200); all are used to close the semi-arc before you can fill the color!