Code

Small snap bug has been eliminated, flowed text snapping now uses baseline, replacing...
[inkscape.git] / src / sp-item.cpp
index 3950482803a544b3efe179f976b39ad03204de72..1a5ca6f772a72f7ba94fd99c153062bdabf9502b 100644 (file)
@@ -412,6 +412,7 @@ sp_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr)
     sp_object_read_attr(object, "inkscape:transform-center-x");
     sp_object_read_attr(object, "inkscape:transform-center-y");
     sp_object_read_attr(object, "inkscape:connector-avoid");
+    sp_object_read_attr(object, "inkscape:connection-points");
 
     if (((SPObjectClass *) (parent_class))->build) {
         (* ((SPObjectClass *) (parent_class))->build)(object, document, repr);
@@ -514,6 +515,9 @@ sp_item_set(SPObject *object, unsigned key, gchar const *value)
         case SP_ATTR_CONNECTOR_AVOID:
             item->avoidRef->setAvoid(value);
             break;
+        case SP_ATTR_CONNECTION_POINTS:
+            item->avoidRef->setConnectionPoints(value);
+            break;
         case SP_ATTR_TRANSFORM_CENTER_X:
             if (value) {
                 item->transform_center_x = g_strtod(value, NULL);
@@ -958,11 +962,11 @@ static void sp_item_private_snappoints(SPItem const *item, bool const target, Sn
         Geom::Point p1, p2;
         p1 = bbox->min();
         p2 = bbox->max();
-        int type = target ? int(Inkscape::SNAPSOURCE_CONVEX_HULL_CORNER) : int(Inkscape::SNAPSOURCE_CONVEX_HULL_CORNER);
+        int type = target ? int(Inkscape::SNAPTARGET_BBOX_CORNER) : int(Inkscape::SNAPSOURCE_BBOX_CORNER);
         p.push_back(std::make_pair(p1, type));
         p.push_back(std::make_pair(Geom::Point(p1[Geom::X], p2[Geom::Y]), type));
         p.push_back(std::make_pair(p2, type));
-        p.push_back(std::make_pair(Geom::Point(p1[Geom::Y], p2[Geom::X]), type));
+        p.push_back(std::make_pair(Geom::Point(p2[Geom::X], p1[Geom::Y]), type));
     }
 
 }