index c8479221502de9ac02240588063c7ee0750c52f8..bf739301336c4cc59dbaa8fbd4367c383a153764 100644 (file)
-/** \file
+/** \file
* Implementation of sp_item_notify_moveto().
*/
@@ -20,12 +20,12 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin
{
g_return_if_fail(SP_IS_ITEM(&item));
g_return_if_fail( unsigned(snappoint_ix) < 8 );
- NR::Point const dir( mv_g.normal );
+ NR::Point const dir( mv_g.normal_to_line );
double const dir_lensq(dot(dir, dir));
g_return_if_fail( dir_lensq != 0 );
- vector<NR::Point> snappoints;
- sp_item_snappoints(&item, SnapPointsIter(snappoints));
+ std::vector<NR::Point> snappoints;
+ sp_item_snappoints(&item, true, SnapPointsIter(snappoints));
g_return_if_fail( snappoint_ix < int(snappoints.size()) );
double const pos0 = dot(dir, snappoints[snappoint_ix]);
s = (position - pos0) / dot(dir, dir). */
NR::translate const tr( ( position - pos0 )
* ( dir / dir_lensq ) );
- sp_item_set_i2d_affine(&item, sp_item_i2d_affine(&item) * tr);
+ sp_item_set_i2d_affine(&item, sp_item_i2d_affine(&item) * to_2geom(tr));
/// \todo Reget snappoints, check satisfied.
if (commit) {
@@ -51,13 +51,13 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin
{
sp_item_write_transform(&item, SP_OBJECT_REPR(&item), item.transform);
}
-
+
sp_item_rm_unsatisfied_cns(item);
#if 0 /* nyi */
move_cn_to_front(mv_g, snappoint_ix, item.constraints);
- /** \note If the guideline is connected to multiple snappoints of
- * this item, then keeping those cns in order requires that the
- * guide send notifications in order of increasing importance.
+ /** \note If the guideline is connected to multiple snappoints of
+ * this item, then keeping those cns in order requires that the
+ * guide send notifications in order of increasing importance.
*/
#endif
}