index 33225f467c3055dad6a5f33cff66bc0de745443a..0a5a6d7bdde9e9fb72ae144ba76ab29c7e0355c5 100644 (file)
--- a/src/sp-conn-end-pair.cpp
+++ b/src/sp-conn-end-pair.cpp
* Authors:
* Peter Moulder <pmoulder@mail.csse.monash.edu.au>
* Michael Wybrow <mjwybrow@users.sourceforge.net>
+ * Abhishek Sharma
*
* * Copyright (C) 2004-2005 Monash University
*
this->_connEnd[handle_ix]->ref.detach();
}
- // If the document is being destroyed then the router instance
+ // If the document is being destroyed then the router instance
// and the ConnRefs will have been destroyed with it.
const bool routerInstanceExists = (_path->document->router != NULL);
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" );
}
case SP_ATTR_CONNECTOR_TYPE:
if (value && (strcmp(value, "polyline") == 0 || strcmp(value, "orthogonal") == 0)) {
int newconnType = strcmp(value, "polyline") ? SP_CONNECTOR_ORTHOGONAL : SP_CONNECTOR_POLYLINE;
-
+
if (!_connRef)
{
_connType = newconnType;
Avoid::Router *router = _path->document->router;
- GQuark itemID = g_quark_from_string(SP_OBJECT(_path)->id);
+ GQuark itemID = g_quark_from_string(_path->getId());
_connRef = new Avoid::ConnRef(router, itemID);
switch (newconnType)
{
@@ -339,7 +340,7 @@ void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, const gdouble curvat
if (!straight)
route = route.curvedPolyline(curvature);
connRef->calcRouteDist();
-
+
curve->reset();
curve->moveto( Geom::Point(route.ps[0].x, route.ps[0].y) );
@@ -359,7 +360,7 @@ void recreateCurve(SPCurve *curve, Avoid::ConnRef *connRef, const gdouble curvat
break;
case 'C':
g_assert( i+2<pn );
- curve->curveto( p, Geom::Point(route.ps[i+1].x, route.ps[i+1].y),
+ curve->curveto( p, Geom::Point(route.ps[i+1].x, route.ps[i+1].y),
Geom::Point(route.ps[i+2].x, route.ps[i+2].y) );
i+=2;
break;
SPCurve *curve = _path->original_curve ?_path->original_curve : _path->curve;
recreateCurve( curve, _connRef, _connCurvature );
-
- Geom::Matrix doc2item = sp_item_i2doc_affine(SP_ITEM(_path)).inverse();
- curve->transform(doc2item);
-
+
+ Geom::Matrix doc2item = SP_ITEM(_path)->i2doc_affine().inverse();
+ curve->transform(doc2item);
+
return true;
}