Code

Filter effects dialog:
[inkscape.git] / src / sp-item.cpp
index fbcc7b4a895b006c0538c9b5e917425a3d6596d9..469b95222cba39a74e921de55a31113367bae5a6 100644 (file)
@@ -50,6 +50,7 @@
 #include "prefs-utils.h"
 #include "conn-avoid-ref.h"
 #include "conditions.h"
+#include "sp-filter-reference.h"
 
 #include "libnr/nr-matrix-div.h"
 #include "libnr/nr-matrix-fns.h"
@@ -61,6 +62,7 @@
 #include "util/reverse-list.h"
 
 #include "xml/repr.h"
+#include "extract-uri.h"
 
 #define noSP_ITEM_DEBUG_IDLE
 
@@ -447,7 +449,7 @@ sp_item_set(SPObject *object, unsigned key, gchar const *value)
             break;
         }
         case SP_PROP_CLIP_PATH: {
-            gchar *uri = Inkscape::parse_css_url(value);
+            gchar *uri = extract_uri(value);
             if (uri) {
                 try {
                     item->clip_ref->attach(Inkscape::URI(uri));
@@ -463,7 +465,7 @@ sp_item_set(SPObject *object, unsigned key, gchar const *value)
             break;
         }
         case SP_PROP_MASK: {
-            gchar *uri=Inkscape::parse_css_url(value);
+            gchar *uri = extract_uri(value);
             if (uri) {
                 try {
                     item->mask_ref->attach(Inkscape::URI(uri));
@@ -785,6 +787,8 @@ void sp_item_snappoints(SPItem const *item, SnapPointsIter p)
     if (item_class.snappoints) {
         item_class.snappoints(item, p);
     }
+    
+    *p = item->getCenter();
 }
 
 void
@@ -1200,7 +1204,7 @@ sp_item_write_transform(SPItem *item, Inkscape::XML::Node *repr, NR::Matrix cons
              !preserve && // user did not chose to preserve all transforms
              !item->clip_ref->getObject() && // the object does not have a clippath
              !item->mask_ref->getObject() && // the object does not have a mask
-             !(!transform.is_translation() && SP_OBJECT_STYLE(item) && SP_OBJECT_STYLE(item)->filter.filter
+         !(!transform.is_translation() && SP_OBJECT_STYLE(item) && SP_OBJECT_STYLE(item)->getFilter()
              // the object does not have a filter, or the transform is translation (which is supposed to not affect filters)
         ) {
         transform_attr = ((SPItemClass *) G_OBJECT_GET_CLASS(item))->set_transform(item, transform);