Code

Filters. Custom predefined filters update and new ABC filters.
[inkscape.git] / src / sp-conn-end-pair.cpp
index 24c7e7e5c314c2e9e5a24aa4c1fab754fba94d25..5bce1a4f80d7a4378848e0e0c66229b73c239c08 100644 (file)
@@ -4,6 +4,7 @@
  * Authors:
  *   Peter Moulder <pmoulder@mail.csse.monash.edu.au>
  *   Michael Wybrow <mjwybrow@users.sourceforge.net>
+ *   Abhishek Sharma
  *
  *    * Copyright (C) 2004-2005 Monash University
  *
@@ -79,12 +80,12 @@ SPConnEndPair::release()
 void
 sp_conn_end_pair_build(SPObject *object)
 {
-    sp_object_read_attr(object, "inkscape:connector-type");
-    sp_object_read_attr(object, "inkscape:connection-start");
-    sp_object_read_attr(object, "inkscape:connection-start-point");
-    sp_object_read_attr(object, "inkscape:connection-end");
-    sp_object_read_attr(object, "inkscape:connection-end-point");
-    sp_object_read_attr(object, "inkscape:connector-curvature");
+    object->readAttr( "inkscape:connector-type" );
+    object->readAttr( "inkscape:connection-start" );
+    object->readAttr( "inkscape:connection-start-point" );
+    object->readAttr( "inkscape:connection-end" );
+    object->readAttr( "inkscape:connection-end-point" );
+    object->readAttr( "inkscape:connector-curvature" );
 }
 
 
@@ -216,6 +217,7 @@ SPConnEndPair::getEndpoints(Geom::Point endPts[]) const {
     SPCurve *curve = _path->original_curve ? _path->original_curve : _path->curve;
     SPItem *h2attItem[2];
     getAttachedItems(h2attItem);
+    Geom::Matrix i2d = SP_ITEM(_path)->i2doc_affine();
 
     for (unsigned h = 0; h < 2; ++h) {
         if ( h2attItem[h] ) {
@@ -225,10 +227,10 @@ SPConnEndPair::getEndpoints(Geom::Point endPts[]) const {
         else
         {
             if (h == 0) {
-                endPts[h] = *(curve->first_point());
+                endPts[h] = *(curve->first_point())*i2d;
             }
             else {
-                endPts[h] = *(curve->last_point());
+                endPts[h] = *(curve->last_point())*i2d;
             }
         }
     }