librsvg numerical stability & ScaleableGorilla ...



Hi Alex,

        I just committed a fix (inspired by Simon Buldig) that stops the
evil
rendering bugs that plague the trashcan ( amongst other things ) with
ScaleableGorilla.

        I just branched librsvg for gnome-2-0-0 and committed to HEAD; it
might
be worth backporting [ given how trivial it is ]

        Patch appended, HTH,

                Michael.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/librsvg/ChangeLog,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -u -r1.89 -r1.90
--- ChangeLog   1 May 2002 14:30:21 -0000       1.89
+++ ChangeLog   8 Jun 2002 14:03:16 -0000       1.90
@@ -1,3 +1,9 @@
+2002-06-08  Michael Meeks  <michael ximian com>
+
+       * rsvg.c (rsvg_render_bpath): perturb the
+       close vpath so we don't get numerical stability
+       problems.
+
 2002-05-01  Anders Carlsson  <andersca gnu org>
 
        * rsvg.c: (rsvg_handle_close):
Index: rsvg.c
===================================================================
RCS file: /cvs/gnome/librsvg/rsvg.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -u -r1.29 -r1.30
--- rsvg.c      1 May 2002 14:30:21 -0000       1.29
+++ rsvg.c      8 Jun 2002 14:03:16 -0000       1.30
@@ -819,12 +819,17 @@ rsvg_render_bpath (RsvgHandle *ctx, cons
 
   if (state->fill != NULL)
     {
-      ArtVpath *closed_vpath;
       ArtSVP *svp2;
+      ArtVpath *pert_vpath;
+      ArtVpath *closed_vpath;
       ArtSvpWriter *swr;
 
       closed_vpath = rsvg_close_vpath (vpath);
-      svp = art_svp_from_vpath (closed_vpath);
+     
+      pert_vpath = art_vpath_perturb (closed_vpath);
+     
+      svp = art_svp_from_vpath (pert_vpath);
+      art_free (pert_vpath);
       g_free (closed_vpath);
      
       swr = art_svp_writer_rewind_new (ART_WIND_RULE_NONZERO);


-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]