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

Tiled Rendering: ensure rendered area is visible correctly.

Using SetVisArea can cause problems due to various internal
state getting confused, however this gives correct output
without viewport assertion problems or missing content.

Change-Id: I8d206ab201167ea96a0ac853187861e8c3d541e5
üst 7bf98cad
...@@ -1785,8 +1785,14 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex ...@@ -1785,8 +1785,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?
VisPortChgd(SwRect(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