summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 66632b4)
raw | patch | inline | side by side (parent: 66632b4)
author | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 31 Jan 2008 19:22:19 +0000 (19:22 +0000) | ||
committer | dvlierop2 <dvlierop2@users.sourceforge.net> | |
Thu, 31 Jan 2008 19:22:19 +0000 (19:22 +0000) |
src/widgets/ruler.cpp | patch | blob | history |
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp
index fab2a0ba91892ae7a8ef5af2d25184c451af20b6..abc8cddfec3934dad16642de7556c3bb38c85c58 100644 (file)
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/ruler.cpp
increment = (gfloat) (width + 2*UNUSED_PIXELS) / (ruler->upper - ruler->lower);
- x = int(Inkscape::round((ruler->position - ruler->lower) * increment + double(xthickness - bs_width) / 2.0) - 1);
+ // Calculate the coordinates (x, y, in pixels) of the tip of the triangle
+ x = int(Inkscape::round((ruler->position - ruler->lower) * increment + double(xthickness - bs_width) / 2.0) - UNUSED_PIXELS);
y = (height + bs_height) / 2 + ythickness;
for (i = 0; i < bs_height; i++)
increment = (gfloat) (height + 2*UNUSED_PIXELS) / (ruler->upper - ruler->lower);
- x = (width + bs_width) / 2 + xthickness;
- y = int(Inkscape::round((ruler->position - ruler->lower) * increment + double(ythickness - bs_height) / 2.0) - 1);
+ // Calculate the coordinates (x, y, in pixels) of the tip of the triangle
+ x = (width + bs_width) / 2 + xthickness;
+ y = int(Inkscape::round((ruler->position - ruler->lower) * increment + double(ythickness - bs_height) / 2.0) - UNUSED_PIXELS);
for (i = 0; i < bs_width; i++)
gdk_draw_line (widget->window, gc,