Code

calling parent's write method may reset the stop's color from repr if it was changed...
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 26 Aug 2007 22:25:37 +0000 (22:25 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 26 Aug 2007 22:25:37 +0000 (22:25 +0000)
src/sp-gradient.cpp

index d35e89bed1ea4c0780d6234ae582b0e7632f84fa..8fad6074abec95235be7761e9e09915f9352e6bb 100644 (file)
@@ -208,6 +208,8 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
         repr = xml_doc->createElement("svg:stop");
     }
 
+    guint32 specifiedcolor = sp_color_get_rgba32_ualpha(&stop->specified_color, 255);
+
     if (((SPObjectClass *) stop_parent_class)->write)
         (* ((SPObjectClass *) stop_parent_class)->write)(object, repr, flags);
 
@@ -221,7 +223,7 @@ sp_stop_write(SPObject *object, Inkscape::XML::Node *repr, guint flags)
         os << "currentColor";
     } else {
         gchar c[64];
-        sp_svg_write_color(c, 64, sp_color_get_rgba32_ualpha(&stop->specified_color, 255));
+        sp_svg_write_color(c, 64, specifiedcolor);
         os << c;
     }
     os << ";stop-opacity:" << stop->opacity;