diff --git a/src/sp-conn-end.cpp b/src/sp-conn-end.cpp
index 99b908e69cd70cf5a2d8e2cd34cb48d3f214ab41..80ecb060f23704ff292382c080b45a00bc35d72e 100644 (file)
--- a/src/sp-conn-end.cpp
+++ b/src/sp-conn-end.cpp
SPItem const *const path_item = SP_ITEM(path);
SPObject const *const ancestor = get_nearest_common_ancestor(path_item, h2attItem);
- NR::Matrix const path2anc(i2anc_affine(path_item, ancestor));
+ NR::Matrix const path2anc(from_2geom(i2anc_affine(path_item, ancestor)));
if (h2attItem[0] != NULL && h2attItem[1] != NULL) {
/* Initial end-points: centre of attached object. */
NR::Matrix h2i2anc[2];
NR::Rect h2bbox_icoordsys[2];
NR::Point last_seg_endPt[2] = {
- sp_curve_second_point(path->curve),
- sp_curve_penultimate_point(path->curve)
+ path->curve->second_point(),
+ path->curve->penultimate_point()
};
for (unsigned h = 0; h < 2; ++h) {
NR::Maybe<NR::Rect> bbox = h2attItem[h]->getBounds(NR::identity());
return;
}
h2bbox_icoordsys[h] = *bbox;
- h2i2anc[h] = i2anc_affine(h2attItem[h], ancestor);
+ h2i2anc[h] = from_2geom(i2anc_affine(h2attItem[h], ancestor));
h2endPt_icoordsys[h] = h2bbox_icoordsys[h].midpoint();
}
NR::Point other_endpt;
NR::Point last_seg_pt;
if (h2attItem[0] != NULL) {
- other_endpt = sp_curve_last_point(path->curve);
- last_seg_pt = sp_curve_second_point(path->curve);
+ other_endpt = path->curve->last_point();
+ last_seg_pt = path->curve->second_point();
ind = 0;
}
else {
- other_endpt = sp_curve_first_point(path->curve);
- last_seg_pt = sp_curve_penultimate_point(path->curve);
+ other_endpt = path->curve->first_point();
+ last_seg_pt = path->curve->penultimate_point();
ind = 1;
}
NR::Point h2endPt_icoordsys[2];
}
h2bbox_icoordsys[ind] = *bbox;
- h2i2anc = i2anc_affine(h2attItem[ind], ancestor);
+ h2i2anc = from_2geom(i2anc_affine(h2attItem[ind], ancestor));
h2endPt_icoordsys[ind] = h2bbox_icoordsys[ind].midpoint();
h2endPt_icoordsys[!ind] = other_endpt;
change_endpts(SPCurve *const curve, NR::Point const h2endPt[2])
{
#if 0
- sp_curve_reset(curve);
- sp_curve_moveto(curve, h2endPt[0]);
- sp_curve_lineto(curve, h2endPt[1]);
+ curve->reset();
+ curve->moveto(h2endPt[0]);
+ curve->lineto(h2endPt[1]);
#else
- sp_curve_move_endpoints(curve, h2endPt[0], h2endPt[1]);
+ curve->move_endpoints(h2endPt[0], h2endPt[1]);
#endif
}