diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2008-01-31 19:22:19 +0000 |
|---|---|---|
| committer | dvlierop2 <dvlierop2@users.sourceforge.net> | 2008-01-31 19:22:19 +0000 |
| commit | cb13f60181caa62af66f9d8d2645a14a87e139da (patch) | |
| tree | b57242a1463846b042e78e69e19ebd5ee76f30d9 /src/widgets/ruler.cpp | |
| parent | Applying fixes for gcc 4.3 build issues (closes LP: #169115) (diff) | |
| download | inkscape-cb13f60181caa62af66f9d8d2645a14a87e139da.tar.gz inkscape-cb13f60181caa62af66f9d8d2645a14a87e139da.zip | |
Additional fix for bug #167500
(bzr r4630)
Diffstat (limited to 'src/widgets/ruler.cpp')
| -rw-r--r-- | src/widgets/ruler.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index fab2a0ba9..abc8cddfe 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -309,7 +309,8 @@ sp_hruler_draw_pos (GtkRuler *ruler) 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++) @@ -646,8 +647,9 @@ sp_vruler_draw_pos (GtkRuler *ruler) 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, |
