summaryrefslogtreecommitdiffstats
path: root/src/display/guideline.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-06-23 22:22:07 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-06-23 22:22:07 +0000
commitab143333746e25648b253f13c0539adff089b1b6 (patch)
tree5a025875e0e107b07b13970374afbd78cb021af7 /src/display/guideline.cpp
parentUpdate 2Geom to pull in integer rectangle class (diff)
downloadinkscape-ab143333746e25648b253f13c0539adff089b1b6.tar.gz
inkscape-ab143333746e25648b253f13c0539adff089b1b6.zip
Remove more of libnr
(bzr r10347.1.2)
Diffstat (limited to 'src/display/guideline.cpp')
-rw-r--r--src/display/guideline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/display/guideline.cpp b/src/display/guideline.cpp
index c761fa74e..c1c3e7740 100644
--- a/src/display/guideline.cpp
+++ b/src/display/guideline.cpp
@@ -112,8 +112,8 @@ static void sp_guideline_render(SPCanvasItem *item, SPCanvasBuf *buf)
cairo_set_line_cap(buf->ct, CAIRO_LINE_CAP_SQUARE);
cairo_set_font_size(buf->ct, 10);
- int px = (int) Inkscape::round(gl->point_on_line[Geom::X]);
- int py = (int) Inkscape::round(gl->point_on_line[Geom::Y]);
+ int px = round(gl->point_on_line[Geom::X]);
+ int py = round(gl->point_on_line[Geom::Y]);
if (gl->label) {
cairo_save(buf->ct);
@@ -126,12 +126,12 @@ static void sp_guideline_render(SPCanvasItem *item, SPCanvasBuf *buf)
}
if (gl->is_vertical()) {
- int position = (int) Inkscape::round(gl->point_on_line[Geom::X]);
+ int position = round(gl->point_on_line[Geom::X]);
cairo_move_to(buf->ct, position + 0.5, buf->rect.y0 + 0.5);
cairo_line_to(buf->ct, position + 0.5, buf->rect.y1 - 0.5);
cairo_stroke(buf->ct);
} else if (gl->is_horizontal()) {
- int position = (int) Inkscape::round(gl->point_on_line[Geom::Y]);
+ int position = round(gl->point_on_line[Geom::Y]);
cairo_move_to(buf->ct, buf->rect.x0 + 0.5, position + 0.5);
cairo_line_to(buf->ct, buf->rect.x1 - 0.5, position + 0.5);
cairo_stroke(buf->ct);
@@ -193,9 +193,9 @@ static void sp_guideline_update(SPCanvasItem *item, Geom::Affine const &affine,
sp_canvas_item_request_update(SP_CANVAS_ITEM (gl->origin));
if (gl->is_horizontal()) {
- sp_canvas_update_bbox (item, -1000000, (int) Inkscape::round(gl->point_on_line[Geom::Y] - 16), 1000000, (int) Inkscape::round(gl->point_on_line[Geom::Y] + 1));
+ sp_canvas_update_bbox (item, -1000000, round(gl->point_on_line[Geom::Y] - 16), 1000000, round(gl->point_on_line[Geom::Y] + 1));
} else if (gl->is_vertical()) {
- sp_canvas_update_bbox (item, (int) Inkscape::round(gl->point_on_line[Geom::X]), -1000000, (int) Inkscape::round(gl->point_on_line[Geom::X] + 16), 1000000);
+ sp_canvas_update_bbox (item, round(gl->point_on_line[Geom::X]), -1000000, round(gl->point_on_line[Geom::X] + 16), 1000000);
} else {
//TODO: labels in angled guidelines are not showing up for some reason.
sp_canvas_update_bbox (item, -1000000, -1000000, 1000000, 1000000);