summaryrefslogtreecommitdiffstats
path: root/src/grid-snapper.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2007-03-25 22:05:48 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2007-03-25 22:05:48 +0000
commitfdc95626108a36c42fc7cd33be24378fd5dc4ef8 (patch)
tree046f63caeb7b807eca0e38aeaa24fcac079f4b9f /src/grid-snapper.cpp
parentImprove dependencies using URI normalization. A little faster, too. (diff)
downloadinkscape-fdc95626108a36c42fc7cd33be24378fd5dc4ef8.tar.gz
inkscape-fdc95626108a36c42fc7cd33be24378fd5dc4ef8.zip
Purging old axonometric grid code: reworked it into the new grid class structure. Still needs alot of work (snapping mostly and code cleansing).
(bzr r2757)
Diffstat (limited to 'src/grid-snapper.cpp')
-rw-r--r--src/grid-snapper.cpp60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/grid-snapper.cpp b/src/grid-snapper.cpp
index c6a802a54..818f0abd9 100644
--- a/src/grid-snapper.cpp
+++ b/src/grid-snapper.cpp
@@ -83,66 +83,6 @@ Inkscape::GridSnapper::_getSnapLines(NR::Point const &p) const
return s;
}
-
-
-Inkscape::AxonomGridSnapper::AxonomGridSnapper(SPNamedView const *nv, NR::Coord const d) : LineSnapper(nv, d)
-{
-
-}
-
-
-Inkscape::LineSnapper::LineList
-Inkscape::AxonomGridSnapper::_getSnapLines(NR::Point const &p) const
-{
- LineList s;
-
- if ( NULL == _named_view ) {
- return s;
- }
-
- SPCAxonomGrid *griditem = NULL;
- for (GSList *l = _named_view->gridviews; l != NULL; l = l->next) {
- // FIXME : this is a hack since there is only one view for now
- // but when we'll handle multiple views, snapping should
- // must be rethought and maybe only the current view
- // should give back it's SHOWN lines to snap to
- // For now, the last SPCAxonomGrid in _named_view->gridviews will be used.
- if ( SP_IS_CAXONOMGRID(GTK_OBJECT(l->data)) ) {
- griditem = SP_CAXONOMGRID(l->data);
- }
- }
-
- g_assert(griditem != NULL);
-
- // add vertical line.
-
-
- // This is to make sure we snap to only visible grid lines
- double scaled_spacing = griditem->spacing_ylines; // this is spacing of visible lines if screen pixels
- // convert screen pixels to px
- // FIXME: after we switch to snapping dist in screen pixels, this will be unnecessary
- if (SP_ACTIVE_DESKTOP) {
- scaled_spacing /= SP_ACTIVE_DESKTOP->current_zoom();
- }
-
- NR::Coord const rounded = round_to_nearest_multiple_plus(p[0], scaled_spacing, griditem->origin[0]);
-
- /*
- int a = round(scaled_spacing);
- int b = round(p[0]);
- int c = round(rounded);
-
- g_message("hier %d; %d; %d",a,b,c);
- */
-
- s.push_back(std::make_pair(NR::Dim2(0), rounded));
-
-
- return s;
-}
-
-
-
/*
Local Variables:
mode:c++