Code

SPObject c++ification finalized along with the beginning of XML Privatisation tweaks
[inkscape.git] / src / sp-gradient-test.h
index 209bc7efb2bd3cfac3defe054869ec42b80d7de5..62c0ac8c2a8ef377599611e158125bd7e544096e 100644 (file)
@@ -56,13 +56,13 @@ public:
         SPGradient *gr = static_cast<SPGradient *>(g_object_new(SP_TYPE_GRADIENT, NULL));
         SP_OBJECT(gr)->document = _doc;
 
-        sp_object_set(SP_OBJECT(gr), SP_ATTR_GRADIENTTRANSFORM, "translate(5, 8)");
+        SP_OBJECT(gr)->setKeyValue( SP_ATTR_GRADIENTTRANSFORM, "translate(5, 8)");
         TS_ASSERT_EQUALS( gr->gradientTransform, Geom::Matrix(Geom::Translate(5, 8)) );
 
-        sp_object_set(SP_OBJECT(gr), SP_ATTR_GRADIENTTRANSFORM, "");
+        SP_OBJECT(gr)->setKeyValue( SP_ATTR_GRADIENTTRANSFORM, "");
         TS_ASSERT_EQUALS( gr->gradientTransform, Geom::identity() );
 
-        sp_object_set(SP_OBJECT(gr), SP_ATTR_GRADIENTTRANSFORM, "rotate(90)");
+        SP_OBJECT(gr)->setKeyValue( SP_ATTR_GRADIENTTRANSFORM, "rotate(90)");
         TS_ASSERT_EQUALS( gr->gradientTransform, Geom::Matrix(rotate_degrees(90)) );
 
         g_object_unref(gr);
@@ -74,7 +74,7 @@ public:
         SPGradient *gr = static_cast<SPGradient *>(g_object_new(SP_TYPE_GRADIENT, NULL));
         SP_OBJECT(gr)->document = _doc;
 
-        sp_object_set(SP_OBJECT(gr), SP_ATTR_GRADIENTTRANSFORM, "matrix(0, 1, -1, 0, 0, 0)");
+        SP_OBJECT(gr)->setKeyValue( SP_ATTR_GRADIENTTRANSFORM, "matrix(0, 1, -1, 0, 0, 0)");
         Inkscape::XML::Document *xml_doc = sp_document_repr_doc(_doc);
         Inkscape::XML::Node *repr = xml_doc->createElement("svg:radialGradient");
         SP_OBJECT(gr)->updateRepr(repr, SP_OBJECT_WRITE_ALL);
@@ -136,7 +136,7 @@ public:
             sp_gradient_set_gs2d_matrix(gr, funny, larger_rect, gs2d);
             TS_ASSERT( Geom::matrix_equalp(gr->gradientTransform, grXform, 1e-12) );
 
-            sp_object_set(SP_OBJECT(gr), SP_ATTR_GRADIENTUNITS, "userSpaceOnUse");
+            SP_OBJECT(gr)->setKeyValue( SP_ATTR_GRADIENTUNITS, "userSpaceOnUse");
             Geom::Matrix const user_g2d(sp_gradient_get_g2d_matrix(gr, funny, larger_rect));
             Geom::Matrix const user_gs2d(sp_gradient_get_gs2d_matrix(gr, funny, larger_rect));
             TS_ASSERT_EQUALS( user_g2d, funny );