summaryrefslogtreecommitdiffstats
path: root/src/desktop.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2008-01-30 20:05:58 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2008-01-30 20:05:58 +0000
commit1f73043224256571ebbbbad8b7e8be4bbc09f9ed (patch)
tree8ae1c33244f10de4166ac6d708b18920b929164d /src/desktop.cpp
parentA bunch of i18n-related issues fixed, ru.po slightly updated. Please do not f... (diff)
downloadinkscape-1f73043224256571ebbbbad8b7e8be4bbc09f9ed.tar.gz
inkscape-1f73043224256571ebbbbad8b7e8be4bbc09f9ed.zip
2nd part of the fix for bug #167500: correctly update the rulers when they change size
(bzr r4621)
Diffstat (limited to 'src/desktop.cpp')
-rw-r--r--src/desktop.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp
index 9498d5399..8cd63a68c 100644
--- a/src/desktop.cpp
+++ b/src/desktop.cpp
@@ -645,7 +645,7 @@ SPDesktop::push_current_zoom (GList **history)
}
/**
- * Set viewbox.
+ * Set viewbox (x0, x1, y0 and y1 are in document pixels. Border is in screen pixels).
*/
void
SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double border, bool log)
@@ -673,7 +673,7 @@ SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double
newscale = viewbox.dimensions()[NR::Y] / (y1 - y0);
}
- newscale = CLAMP(newscale, SP_DESKTOP_ZOOM_MIN, SP_DESKTOP_ZOOM_MAX);
+ newscale = CLAMP(newscale, SP_DESKTOP_ZOOM_MIN, SP_DESKTOP_ZOOM_MAX); // unit: 'screen pixels' per 'document pixels'
int clear = FALSE;
if (!NR_DF_TEST_CLOSE (newscale, scale, 1e-4 * scale)) {
@@ -684,7 +684,7 @@ SPDesktop::set_display_area (double x0, double y0, double x1, double y1, double
clear = TRUE;
}
- /* Calculate top left corner */
+ /* Calculate top left corner (in document pixels) */
x0 = cx - 0.5 * viewbox.dimensions()[NR::X] / newscale;
y1 = cy + 0.5 * viewbox.dimensions()[NR::Y] / newscale;