diff options
author | Jan Holesovsky <kendy@collabora.com> | 2013-10-24 12:04:18 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-15 16:51:51 +0100 |
commit | f2c3fcc3bcf5e2f3264cd37b721f7fbfa0fae3a8 (patch) | |
tree | d35f63bd98e9e63cf13338542d98245e7a69216b /sw/qa | |
parent | 637e8970cfe56d53b5d1da40b31246414e54c759 (diff) |
Tiled rendering: Very crude way to "show something".
We are reusing the ViewShell's output device; instead we should provide an
own, and draw to that one - to be continued...
Change-Id: I4ed1bffbbcedeefa955db1d59eb4b252f4a25a64
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/tiledrendering/tiledrendering.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx index 6f6e6e150c63..389e997bf970 100644 --- a/sw/qa/tiledrendering/tiledrendering.cxx +++ b/sw/qa/tiledrendering/tiledrendering.cxx @@ -125,13 +125,29 @@ IMPL_LINK ( TiledRenderingDialog, RenderHdl, Button *, EMPTYARG ) // SystemGraphicsData aData; // [setup the aData] // VirtualDevice aDevice(&aData, [color depth]); - VirtualDevice aDevice; +/* + // FIXME don't use pViewShell()->GetOut() directly, we need an own + // device here, something like +#ifdef IOS + VirtualDevice aDevice(8); +#else + VirtualDevice aDevice(1); +#endif + + aDevice.SetReferenceDevice(VirtualDevice::REFDEV_MODE_MSO1); + MapMode aMapMode(aDevice.GetMapMode()); + aMapMode.SetMapUnit(MAP_TWIP); + aDevice.SetMapMode(aMapMode); + aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight)); +*/ - pViewShell->PaintTile(&aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); + pViewShell->PaintTile(pViewShell->GetOut(), Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); + // FIXME pViewShell->PaintTile(&aDevice, Rectangle(tilePosX, tilePosY, tileWidth, tileHeight)); // copy the aDevice content to mpImage - BitmapEx aBitmap(aDevice.GetBitmapEx(Point(0,0), aDevice.GetOutputSizePixel())); + // FIXME BitmapEx aBitmap(pViewShell->GetOut()->GetBitmapEx(Point(0,0), aDevice.PixelToLogic(Size(contextWidth, contextHeight)))); + BitmapEx aBitmap(pViewShell->GetOut()->GetBitmapEx(Point(0,0), pViewShell->GetOut()->PixelToLogic(Size(contextWidth, contextHeight)))); mpImage->SetImage(Image(aBitmap)); // update the dialog size |