summaryrefslogtreecommitdiffstats
path: root/src/sp-item-update-cns.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2018-01-30 08:33:01 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-01-30 08:33:01 +0000
commit267299811df952d08324a39008f52c19641de9e0 (patch)
tree28fef736a52cb7a72119d119be8eb663ad20a77f /src/sp-item-update-cns.cpp
parentTranslations: update inkscape.pot (diff)
downloadinkscape-267299811df952d08324a39008f52c19641de9e0.tar.gz
inkscape-267299811df952d08324a39008f52c19641de9e0.zip
Move classes derived from SPObject to own directory.
A lot of header clean-up.
Diffstat (limited to 'src/sp-item-update-cns.cpp')
-rw-r--r--src/sp-item-update-cns.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/sp-item-update-cns.cpp b/src/sp-item-update-cns.cpp
deleted file mode 100644
index 9aef336c5..000000000
--- a/src/sp-item-update-cns.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-
-#include "satisfied-guide-cns.h"
-#include "sp-item-update-cns.h"
-#include "sp-guide.h"
-
-using std::find;
-using std::vector;
-
-void sp_item_update_cns(SPItem &item, SPDesktop const &desktop)
-{
- std::vector<Inkscape::SnapCandidatePoint> snappoints;
- item.getSnappoints(snappoints, NULL);
- /* TODO: Implement the ordering. */
- vector<SPGuideConstraint> found_cns;
- satisfied_guide_cns(desktop, snappoints, found_cns);
- /* effic: It might be nice to avoid an n^2 algorithm, but in practice n will be
- small enough that it's still usually more efficient. */
-
- for (vector<SPGuideConstraint>::const_iterator fi(found_cns.begin()),
- fiEnd(found_cns.end());
- fi != fiEnd; ++fi)
- {
- SPGuideConstraint const &cn = *fi;
- if ( find(item.constraints.begin(),
- item.constraints.end(),
- cn)
- == item.constraints.end() )
- {
- item.constraints.push_back(cn);
- cn.g->attached_items.push_back(SPGuideAttachment(&item, cn.snappoint_ix));
- }
- }
-}
-
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :