From 8867de5daf309e4cdd3fce177b408618490be4f3 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Tue, 29 Jun 2010 23:35:42 +0530 Subject: This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options]. (bzr r9546.1.1) --- src/sp-item-notify-moveto.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sp-item-notify-moveto.cpp') diff --git a/src/sp-item-notify-moveto.cpp b/src/sp-item-notify-moveto.cpp index 628d77956..340aac1ac 100644 --- a/src/sp-item-notify-moveto.cpp +++ b/src/sp-item-notify-moveto.cpp @@ -25,7 +25,7 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin g_return_if_fail( dir_lensq != 0 ); std::vector snappoints; - sp_item_snappoints(&item, snappoints, NULL); + item.getSnappoints(snappoints, NULL); g_return_if_fail( snappoint_ix < int(snappoints.size()) ); double const pos0 = dot(dir, snappoints[snappoint_ix].getPoint()); @@ -41,7 +41,7 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin s = (position - pos0) / dot(dir, dir). */ Geom::Translate const tr( ( position - pos0 ) * ( dir / dir_lensq ) ); - sp_item_set_i2d_affine(&item, sp_item_i2d_affine(&item) * tr); + item.set_i2d_affine(item.i2d_affine() * tr); /// \todo Reget snappoints, check satisfied. if (commit) { @@ -49,7 +49,7 @@ void sp_item_notify_moveto(SPItem &item, SPGuide const &mv_g, int const snappoin /* Commit repr. */ { - sp_item_write_transform(&item, SP_OBJECT_REPR(&item), item.transform); + item.doWriteTransform(SP_OBJECT_REPR(&item), item.transform); } sp_item_rm_unsatisfied_cns(item); -- cgit v1.2.3