@@ -324,6 +324,21 @@ namespace CPPAGGRenderer{
324
324
agg::render_scanlines (m_ras, m_sl_p8, ren_aa);
325
325
}
326
326
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
+
327
342
void draw_solid_triangle (float x1, float x2, float x3, float y1, float y2, float y3, float r, float g, float b, float a) {
328
343
agg::rendering_buffer rbuf = agg::rendering_buffer (buffer, frame_width, frame_height, -frame_width*3 );
329
344
pixfmt pixf = pixfmt (rbuf);
@@ -539,6 +554,11 @@ namespace CPPAGGRenderer{
539
554
plot -> draw_solid_circle (cx, cy, radius, r, g, b, a);
540
555
}
541
556
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
+
542
562
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){
543
563
Plot *plot = (Plot *)object;
544
564
plot -> draw_solid_triangle (x1, x2, x3, y1 , y2, y3, r, g, b, a);
0 commit comments