]> granicus.if.org Git - graphviz/commitdiff
add ellipses
authorellson <devnull@localhost>
Tue, 5 Sep 2006 18:19:47 +0000 (18:19 +0000)
committerellson <devnull@localhost>
Tue, 5 Sep 2006 18:19:47 +0000 (18:19 +0000)
plugin/ming/gvrender_ming.c

index f81e3bb37f0416cd6ea7c6a3964f0e830b8fd329..94ed1d4dc250bd9f0dd6bf0c6474f5c80198c51e 100644 (file)
@@ -112,6 +112,7 @@ static void ming_ellipse(GVJ_t * job, pointf * A, int filled)
     SWFMovie movie = (SWFMovie)(job->surface);
     SWFShape shape;
     SWFFill fill;
+    SWFDisplayItem item;
     obj_state_t *obj = job->obj;
     gvcolor_t pencolor = obj->pencolor;
     gvcolor_t fillcolor = obj->fillcolor;
@@ -131,11 +132,13 @@ static void ming_ellipse(GVJ_t * job, pointf * A, int filled)
            fillcolor.u.rgba[3]);
        SWFShape_setRightFill(shape, fill);
     }
-    SWFShape_movePenTo(shape, A[0].x, A[0].y);
+    SWFShape_movePenTo(shape, 0, 0);
     rx = A[1].x - A[0].x;
     ry = A[1].y - A[0].y;
-    SWFShape_drawCircle(shape, rx);            /* FIXME */
-    SWFMovie_add(movie, (SWFBlock)shape);
+    SWFShape_drawCircle(shape, rx);
+    item = SWFMovie_add(movie, (SWFBlock)shape);
+    SWFDisplayItem_scale(item, 1., ry/rx);
+    SWFDisplayItem_moveTo(item, A[0].x, A[0].y);
 }
 
 static void