From ae022474668502f99d6ac9322bf67d1caad15718 Mon Sep 17 00:00:00 2001 From: mental Date: Tue, 23 Jan 2007 01:39:49 +0000 Subject: [PATCH] replace use of sp_repr_new in gradient-vector --- src/widgets/gradient-vector.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp index 0bacfa01b..5a0b5c35e 100644 --- a/src/widgets/gradient-vector.cpp +++ b/src/widgets/gradient-vector.cpp @@ -464,6 +464,9 @@ verify_grad(SPGradient *gradient) } } + Inkscape::XML::Document *xml_doc; + xml_doc = SP_OBJECT_REPR(gradient)->document(); + if (i < 1) { gchar c[64]; sp_svg_write_color (c, 64, 0x00000000); @@ -473,12 +476,12 @@ verify_grad(SPGradient *gradient) Inkscape::XML::Node *child; - child = sp_repr_new ("svg:stop"); + child = xml_doc->createElement("svg:stop"); sp_repr_set_css_double(child, "offset", 0.0); child->setAttribute("style", os.str().c_str()); SP_OBJECT_REPR (gradient)->addChild(child, NULL); - child = sp_repr_new ("svg:stop"); + child = xml_doc->createElement("svg:stop"); sp_repr_set_css_double(child, "offset", 1.0); child->setAttribute("style", os.str().c_str()); SP_OBJECT_REPR (gradient)->addChild(child, NULL); -- 2.30.2