diff options
| author | MenTaLguY <mental@rydia.net> | 2007-01-23 01:39:49 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-01-23 01:39:49 +0000 |
| commit | 7cb679c9a5f722732b06b65e52951fa97afce7df (patch) | |
| tree | eb0e142ef521e58ac61e14bb87de3d95883c4510 /src/widgets/gradient-vector.cpp | |
| parent | more simplification (diff) | |
| download | inkscape-7cb679c9a5f722732b06b65e52951fa97afce7df.tar.gz inkscape-7cb679c9a5f722732b06b65e52951fa97afce7df.zip | |
replace use of sp_repr_new in gradient-vector
(bzr r2261)
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
| -rw-r--r-- | src/widgets/gradient-vector.cpp | 7 |
1 files 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); |
