In the last two sections, it was mentioned that AGG::RASTERIZER_SCANLINE_AA also support drawing lines, but unfortunately, we call the class move_to,line_to function completely without any effect, draw line, is not the picture, But in fact it is we do not set the width of the line segment, the end of the line shape, there is no way to call Agg::conv_stroke Ah!! And there is a problem, using move_to to replace the move_to_d, and then, can not be rendered at all, and try to render a rectangle, fiasco Ah!!
The code is as follows:
Scanline Rasterizer Rasterization, said she was the album, describing all we were about to portray patterns, colors, lines,
But it is not true, because she is just a container, a specification that records line segments, signs, detailed parameters,
Not even a sketch, she was more like a cookbook, which recorded the ingredients and recorded the cooking process, that's all.
Agg::rasterizer_scanline_aa<> RAS;
AGG::SCANLINE_U8 SL;
Ras.reset ();
Build triangles with fill color blue, support floating-point numbers
Ras.move_to_d (500,500);
Ras.line_to_d (500,600);
Ras.line_to_d (700,700);
Rensl.color (Agg::rgba8 (0,0,255));
Agg::render_scanlines (RAS,SL,RENSL);
Ras.reset ();
AGG::RASTERIZER_SCANLINE_AA Paint Fill Color triangle