summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-13 10:43:07 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-25 13:04:31 +0100
commitff6a38b76df80d0f907f2f92cb851dea43c91d81 (patch)
treee5a2381b44fd160df50aa169d0819570e7720aa9
parent17f223c195867df8356a9e8c86981d88ce3b4b05 (diff)
Tiled Rendering: ensure rendered area is visible.
MakeVisible only scrolls the view, so parts of the tile to be rendered might be outside the SwView's visible area, and therefore not painted. This however makes the background window (shown for the tilederendering app) unuseable (but that window is invisible for all practical uses of tiled rendering, and hence probably not a problem). Change-Id: I6c3c2846906163b362f7cff6d8c7ba308a58a7ad
-rw-r--r--sw/source/core/view/viewsh.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index ea111dd0308e..cc802987f242 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1784,8 +1784,14 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
Imp()->GetDrawView()->AddWindowToPaintView(&rDevice);
}
- // scroll the requested area into view if necessary
- MakeVisible(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
+ // Make the requested area visible -- we can't use MakeVisible as that will
+ // only scroll the contents, but won't zoom/resize if needed.
+ // Without this, items/text that are outside the visible area (in the SwView)
+ // won't be painted when rendering tiles (at least when using either the
+ // tiledrendering app, or the gtktiledviewer) -- although ultimately we
+ // probably want to fix things so that the SwView's area doesn't affect
+ // tiled rendering?
+ mpDoc->GetDocShell()->SetVisArea(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
// draw - works in logic coordinates
Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));