When you draw a closed drawing, fill it with one color and then paint the border with another color
Operation Steps:
1 render vertex sources directly
2 extracting contour lines from vertex sources by Agg::conv_stroke
3 draw a contour line in another color
Instance code:
Agg::ellipse ell (200,200,50,100);
Ras.add_path (ELL);
Agg::render_scanlines_aa_solid (Ras,sl,renb,agg::rgba8 (255,0,0));
Ras.reset ();
agg::conv_stroke<agg::ellipse> stroke (ELL);
Ras.add_path (stroke);
Agg::render_scanlines_aa_solid (Ras,sl,renb,agg::rgba8 (0,0,255));
Ras.reset ();
The same can be adjusted to see if you first draw the contour line, then fill the effect:
Agg::ellipse ell (200,200,50,100);
agg::conv_stroke<agg::ellipse> stroke (ELL);
Ras.add_path (stroke);
Agg::render_scanlines_aa_solid (Ras,sl,renb,agg::rgba8 (0,0,255));
Ras.reset ();
Ras.add_path (ELL);
Agg::render_scanlines_aa_solid (Ras,sl,renb,agg::rgba8 (255,0,0));
Ras.reset ();
Analysis: Why the first method is valid, the second invalid!! In fact, when the fill color, together with the boundary rendering, if the fill color in the back, certainly even the boundary is re-rendered again, so the outline of the color of the line is gone!!
Enclosing a fill solid another color render border