AGG lesson 19 agg::bezier_arc
Void DrawCurveOfBezierArc ()
{
Agg::rendering_buffer & rbuf = rbuf_window ()
Agg::pixfmt_bgr24 pixf (rbuf)
Typedef agg::renderer_base renderer_base_type
Renderer_base_type renb (pixf)
Typedef agg::renderer_scanline_aa_solid renderder_scanline_type
Renderder_scanline_type rensl (renb)
Agg::rasterizer_scanline_aa ras
Agg::scanline_u8 sl
Ras.reset ()
Agg::bezier_arc a (100,50,50,0.0, agg::pi/2)
Agg::conv_curve c (a)
Agg::conv_stroke s (c)
Agg::conv_stroke stroke (a)
Ras.add_path (s)
/ / ras.add_path (stroke); / / Comparative view
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255j0pl 0))
}
Add:
It is based on the recognizable VertexSource that the construction parameter of curve information is VertexSource,conv_smooth_poly1_curve. The vertex in the routine has no curve information, so she will be used in the text output.