@@ -324,6 +324,21 @@ namespace CPPAGGRenderer{
324324 agg::render_scanlines (m_ras, m_sl_p8, ren_aa);
325325 }
326326
327+ void draw_solid_ellipse (float cx, float cy, float rx, float ry, float r, float g, float b, float a) {
328+ agg::rendering_buffer rbuf = agg::rendering_buffer (buffer, frame_width, frame_height, -frame_width*3 );
329+ pixfmt pixf = pixfmt (rbuf);
330+ renderer_base rb = renderer_base (pixf);
331+ ren_aa = renderer_aa (rb);
332+ agg::ellipse ellipse (cx, cy, rx, ry, 100 );
333+ Color c (r, g, b, a);
334+ agg::trans_affine matrix;
335+ matrix *= agg::trans_affine_translation (0 , 0 );
336+ agg::conv_transform<agg::ellipse, agg::trans_affine> trans (ellipse, matrix);
337+ m_ras.add_path (trans);
338+ ren_aa.color (c);
339+ agg::render_scanlines (m_ras, m_sl_p8, ren_aa);
340+ }
341+
327342 void draw_solid_triangle (float x1, float x2, float x3, float y1, float y2, float y3, float r, float g, float b, float a) {
328343 agg::rendering_buffer rbuf = agg::rendering_buffer (buffer, frame_width, frame_height, -frame_width*3 );
329344 pixfmt pixf = pixfmt (rbuf);
@@ -539,6 +554,11 @@ namespace CPPAGGRenderer{
539554 plot -> draw_solid_circle (cx, cy, radius, r, g, b, a);
540555 }
541556
557+ void draw_solid_ellipse (float cx, float cy, float rx, float ry, float r, float g, float b, float a, const void *object){
558+ Plot *plot = (Plot *)object;
559+ plot -> draw_solid_ellipse (cx, cy, rx, ry, r, g, b, a);
560+ }
561+
542562 void draw_solid_triangle (float x1, float x2, float x3, float y1, float y2, float y3, float r, float g, float b, float a, const void *object){
543563 Plot *plot = (Plot *)object;
544564 plot -> draw_solid_triangle (x1, x2, x3, y1, y2, y3, r, g, b, a);
0 commit comments