summaryrefslogtreecommitdiffstats
path: root/src/display/sp-canvas.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2017-03-30 09:41:29 +0000
committertavmjong-free <tavmjong@free.fr>2017-03-30 09:41:29 +0000
commit3de63445fe736ca7c67cdce96426f6e5e3b8ebf4 (patch)
tree2d40dafb380e3879ed5d9d8d4a6cfabd00761fb6 /src/display/sp-canvas.cpp
parentWhite space. (diff)
downloadinkscape-3de63445fe736ca7c67cdce96426f6e5e3b8ebf4.tar.gz
inkscape-3de63445fe736ca7c67cdce96426f6e5e3b8ebf4.zip
Add canvas-rotate for rapid previewing canvas rotation.
Add canvas-debug for study of canvas tiling. (bzr r15612)
Diffstat (limited to 'src/display/sp-canvas.cpp')
-rw-r--r--src/display/sp-canvas.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp
index f27038593..74aa4807a 100644
--- a/src/display/sp-canvas.cpp
+++ b/src/display/sp-canvas.cpp
@@ -1507,7 +1507,7 @@ void SPCanvas::paintSingleBuffer(Geom::IntRect const &paint_rect, Geom::IntRect
buf.buf = NULL;
buf.buf_rowstride = 0;
buf.rect = paint_rect;
- buf.visible_rect = canvas_rect;
+ buf.canvas_rect = canvas_rect;
buf.is_empty = true;
// create temporary surface
@@ -1571,7 +1571,7 @@ void SPCanvas::paintSingleBuffer(Geom::IntRect const &paint_rect, Geom::IntRect
}
struct PaintRectSetup {
- Geom::IntRect big_rect;
+ Geom::IntRect canvas_rect;
GTimeVal start_time;
int max_pixels;
Geom::Point mouse_loc;
@@ -1630,7 +1630,7 @@ int SPCanvas::paintRectInternal(PaintRectSetup const *setup, Geom::IntRect const
gdk_window_begin_paint_rect(window, &r);
*/
- paintSingleBuffer(this_rect, setup->big_rect, bw);
+ paintSingleBuffer(this_rect, setup->canvas_rect, bw);
//gdk_window_end_paint(window);
return 1;
}
@@ -1695,6 +1695,7 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1)
gtk_widget_get_allocation(GTK_WIDGET(this), &allocation);
+ // Find window rectangle in 'world coordinates'.
Geom::IntRect canvas_rect = Geom::IntRect::from_xywh(_x0, _y0,
allocation.width, allocation.height);
Geom::IntRect paint_rect(xx0, yy0, xx1, yy1);
@@ -1705,7 +1706,7 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1)
paint_rect = *area;
PaintRectSetup setup;
- setup.big_rect = paint_rect;
+ setup.canvas_rect = canvas_rect;
// Save the mouse location
gint x, y;