X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-conn-end-pair.cpp;h=786209fdae0a4a859286a85aed84c59f45e55529;hb=8555d598e860ad381f957d4423507a568ac3cd20;hp=d13ef9e86a00f022f0f3c31df91e484928adec2d;hpb=e7333a0a54c8d33b7397406dd76938aa430836d5;p=inkscape.git diff --git a/src/sp-conn-end-pair.cpp b/src/sp-conn-end-pair.cpp index d13ef9e86..786209fda 100644 --- a/src/sp-conn-end-pair.cpp +++ b/src/sp-conn-end-pair.cpp @@ -10,6 +10,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include +#include + #include "attributes.h" #include "sp-conn-end.h" #include "uri.h" @@ -164,7 +167,7 @@ SPConnEndPair::getEndpoints(NR::Point endPts[]) const { for (unsigned h = 0; h < 2; ++h) { if ( h2attItem[h] ) { - NR::Maybe bbox = h2attItem[h]->getBounds(sp_item_i2doc_affine(h2attItem[h])); + NR::Maybe bbox = h2attItem[h]->getBounds(from_2geom(sp_item_i2doc_affine(h2attItem[h]))); if (bbox) { endPts[h] = bbox->midpoint(); } else { @@ -175,10 +178,10 @@ SPConnEndPair::getEndpoints(NR::Point endPts[]) const { else { if (h == 0) { - endPts[h] = sp_curve_first_point(curve); + endPts[h] = curve->first_point(); } else { - endPts[h] = sp_curve_last_point(curve); + endPts[h] = curve->last_point(); } } } @@ -299,12 +302,12 @@ SPConnEndPair::reroutePath(void) Avoid::PolyLine route = _connRef->route(); _connRef->calcRouteDist(); - sp_curve_reset(curve); - sp_curve_moveto(curve, endPt[0]); + curve->reset(); + curve->moveto(endPt[0]); for (int i = 1; i < route.pn; ++i) { NR::Point p(route.ps[i].x, route.ps[i].y); - sp_curve_lineto(curve, p); + curve->lineto(p); } }