diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2007-12-08 21:18:49 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2007-12-08 21:18:49 +0000 |
| commit | 60310d81f6d2ab4b7e919a07097e95d187c3273f (patch) | |
| tree | 0e907f212c69edb1674514bb28555dacd5fb746b /src/guide-snapper.cpp | |
| parent | corrected a typo and added a check for modevia name definition. fall back on ... (diff) | |
| download | inkscape-60310d81f6d2ab4b7e919a07097e95d187c3273f.tar.gz inkscape-60310d81f6d2ab4b7e919a07097e95d187c3273f.zip | |
Snap to axonometric grid lines
(bzr r4194)
Diffstat (limited to 'src/guide-snapper.cpp')
| -rw-r--r-- | src/guide-snapper.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/guide-snapper.cpp b/src/guide-snapper.cpp index a1df5f1cd..0d7dffd00 100644 --- a/src/guide-snapper.cpp +++ b/src/guide-snapper.cpp @@ -32,13 +32,8 @@ Inkscape::GuideSnapper::LineList Inkscape::GuideSnapper::_getSnapLines(NR::Point for (GSList const *l = _named_view->guides; l != NULL; l = l->next) { SPGuide const *g = SP_GUIDE(l->data); - - /* We assume here that guides are horizontal or vertical */ - if (g->normal == component_vectors[NR::X]) { - s.push_back(std::make_pair(NR::X, g->position)); - } else { - s.push_back(std::make_pair(NR::Y, g->position)); - } + NR::Point point_on_line = (g->normal == component_vectors[NR::X]) ? NR::Point(g->position, 0) : NR::Point(0, g->position); + s.push_back(std::make_pair(g->normal, point_on_line)); } return s; |
