From 7b0114087822b9f011d740f1279d1d9ed983a88c Mon Sep 17 00:00:00 2001 From: Ralf Stephan Date: Wed, 15 Feb 2006 19:04:29 +0000 Subject: bulk trailing spaces removal. consistency through MD5 of binary (bzr r149) --- src/snap.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/snap.cpp') diff --git a/src/snap.cpp b/src/snap.cpp index b14549db3..111ef619f 100644 --- a/src/snap.cpp +++ b/src/snap.cpp @@ -57,7 +57,7 @@ Inkscape::SnappedPoint SnapManager::freeSnap(Inkscape::Snapper::PointType t, std::list const &it) const { Inkscape::SnappedPoint r(p, NR_HUGE); - + SPNamedView::SnapperList snappers = namedview->getSnappers(); for (SPNamedView::SnapperList::const_iterator i = snappers.begin(); i != snappers.end(); i++) { Inkscape::SnappedPoint const s = (*i)->freeSnap(t, p, it); @@ -87,7 +87,7 @@ Inkscape::SnappedPoint SnapManager::constrainedSnap(Inkscape::Snapper::PointType std::list const &it) const { Inkscape::SnappedPoint r(p, NR_HUGE); - + SPNamedView::SnapperList snappers = namedview->getSnappers(); for (SPNamedView::SnapperList::const_iterator i = snappers.begin(); i != snappers.end(); i++) { Inkscape::SnappedPoint const s = (*i)->constrainedSnap(t, p, c, it); @@ -195,7 +195,7 @@ NR::Coord namedview_dim_snap(SPNamedView const *nv, Inkscape::Snapper::PointType } -NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointType t, +NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointType t, NR::Point &req, NR::Point const &d, SPItem const *it) { @@ -213,7 +213,7 @@ NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointT * * \pre d ≁ (0, 0). */ -NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointType t, +NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointType t, NR::Point &req, NR::Point const &d, std::list const &it) { @@ -239,14 +239,14 @@ NR::Coord namedview_vector_snap(SPNamedView const *nv, Inkscape::Snapper::PointT * functions for lists of points * * All functions take a list of NR::Point and parameter indicating the proposed transformation. - * They return the updated transformation parameter. + * They return the updated transformation parameter. */ /** * Snap list of points in one dimension. * \return Coordinate difference. */ -std::pair namedview_dim_snap_list(SPNamedView const *nv, Inkscape::Snapper::PointType t, +std::pair namedview_dim_snap_list(SPNamedView const *nv, Inkscape::Snapper::PointType t, const std::vector &p, NR::Coord const dx, NR::Dim2 const dim, std::list const &it @@ -256,7 +256,7 @@ std::pair namedview_dim_snap_list(SPNamedView const *nv, Inksca NR::Coord xdist = dx; SnapManager const m(nv); - + if (m.willSnapSomething()) { for (std::vector::const_iterator i = p.begin(); i != p.end(); i++) { NR::Point q = *i; @@ -276,8 +276,8 @@ std::pair namedview_dim_snap_list(SPNamedView const *nv, Inksca /** * Snap list of points in two dimensions. */ -std::pair namedview_vector_snap_list(SPNamedView const *nv, Inkscape::Snapper::PointType t, - const std::vector &p, NR::Point const &norm, +std::pair namedview_vector_snap_list(SPNamedView const *nv, Inkscape::Snapper::PointType t, + const std::vector &p, NR::Point const &norm, NR::scale const &s, std::list const &it) { using NR::X; @@ -288,7 +288,7 @@ std::pair namedview_vector_snap_list(SPNamedView const *nv, Inksca if (m.willSnapSomething() == false) { return std::make_pair(s[X], false); } - + NR::Coord dist = NR_HUGE; double ratio = fabs(s[X]); for (std::vector::const_iterator i = p.begin(); i != p.end(); i++) { @@ -307,7 +307,7 @@ std::pair namedview_vector_snap_list(SPNamedView const *nv, Inksca } } } - + return std::make_pair(ratio, dist < NR_HUGE); } @@ -318,8 +318,8 @@ std::pair namedview_vector_snap_list(SPNamedView const *nv, Inksca * * \return Pair containing snapped scale and a flag which is true if a snap was made. */ -std::pair namedview_dim_snap_list_scale(SPNamedView const *nv, Inkscape::Snapper::PointType t, - const std::vector &p, NR::Point const &norm, +std::pair namedview_dim_snap_list_scale(SPNamedView const *nv, Inkscape::Snapper::PointType t, + const std::vector &p, NR::Point const &norm, double const sx, NR::Dim2 dim, std::list const &it) { @@ -339,13 +339,13 @@ std::pair namedview_dim_snap_list_scale(SPNamedView const *nv, Ink /* Scaled version of the point we are looking at */ check[dim] = (sx * (q - norm) + norm)[dim]; - + if (fabs (q[dim] - norm[dim]) > MIN_DIST_NORM) { /* Snap this point */ const NR::Coord d = namedview_dim_snap (nv, t, check, dim, it); /* Work out the resulting scale factor */ double snapped_scale = (check[dim] - norm[dim]) / (q[dim] - norm[dim]); - + if (dist == NR_HUGE || fabs(snapped_scale - sx) < fabs(scale - sx)) { /* This is either the first point, or the snapped scale ** is the closest yet to the original. @@ -362,12 +362,12 @@ std::pair namedview_dim_snap_list_scale(SPNamedView const *nv, Ink /** * Try to snap points after they have been skewed. */ -double namedview_dim_snap_list_skew(SPNamedView const *nv, Inkscape::Snapper::PointType t, - const std::vector &p, NR::Point const &norm, +double namedview_dim_snap_list_skew(SPNamedView const *nv, Inkscape::Snapper::PointType t, + const std::vector &p, NR::Point const &norm, double const sx, NR::Dim2 const dim) { SnapManager const m(nv); - + if (m.willSnapSomething() == false) { return sx; } @@ -376,7 +376,7 @@ double namedview_dim_snap_list_skew(SPNamedView const *nv, Inkscape::Snapper::Po gdouble dist = NR_HUGE; gdouble skew = sx; - + for (std::vector::const_iterator i = p.begin(); i != p.end(); i++) { NR::Point q = *i; NR::Point check = q; -- cgit v1.2.3