summaryrefslogtreecommitdiffstats
path: root/src/display/guideline.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-14 19:42:57 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-14 19:42:57 +0000
commitefbf9755460d4c4b7a3d9d43dd753afcc8a28865 (patch)
tree41a259211da187e29f9983821b4cdfea221b6ad6 /src/display/guideline.cpp
parentFix crashes in print preview (diff)
parentMake cms_key in SPDesktopWidget a regular ustring rather than a pointer (diff)
downloadinkscape-efbf9755460d4c4b7a3d9d43dd753afcc8a28865.tar.gz
inkscape-efbf9755460d4c4b7a3d9d43dd753afcc8a28865.zip
Merge SPCanvasArena caching layer work
(bzr r10451)
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);