Kaydet (Commit) ff6a38b7 authored tarafından Andrzej Hunt's avatar Andrzej Hunt

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
üst 17f223c1
...@@ -1784,8 +1784,14 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex ...@@ -1784,8 +1784,14 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex
Imp()->GetDrawView()->AddWindowToPaintView(&rDevice); Imp()->GetDrawView()->AddWindowToPaintView(&rDevice);
} }
// scroll the requested area into view if necessary // Make the requested area visible -- we can't use MakeVisible as that will
MakeVisible(SwRect(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); // 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 // draw - works in logic coordinates
Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight)))); Paint(Rectangle(Point(tilePosX, tilePosY), rDevice.PixelToLogic(Size(contextWidth, contextHeight))));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment