Kaydet (Commit) 3ea4d268 authored tarafından Ptyl Dragon's avatar Ptyl Dragon Kaydeden (comit) Jan Holesovsky

in progress tile rendering

Change-Id: Ie49fc47700287c3c21f234e3fece2b3afd272d24
üst 896f76f5
...@@ -160,7 +160,9 @@ void SwViewShell::DLPrePaint2(const Region& rRegion) ...@@ -160,7 +160,9 @@ void SwViewShell::DLPrePaint2(const Region& rRegion)
if(mpTargetPaintWindow->GetPreRenderDevice()) if(mpTargetPaintWindow->GetPreRenderDevice())
{ {
mpBufferedOut = mpOut; mpBufferedOut = mpOut;
#ifndef IOS
mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice()); mpOut = &(mpTargetPaintWindow->GetTargetOutputDevice());
#endif
} }
// remember original paint MapMode for wrapped FlyFrame paints // remember original paint MapMode for wrapped FlyFrame paints
...@@ -190,11 +192,13 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer) ...@@ -190,11 +192,13 @@ void SwViewShell::DLPostPaint2(bool bPaintFormLayer)
mPrePostPaintRegions.pop(); // clear mPrePostPaintRegions.pop(); // clear
if(0 != mpTargetPaintWindow) if(0 != mpTargetPaintWindow)
{ {
#ifndef IOS
// #i74769# restore buffered OutDev // #i74769# restore buffered OutDev
if(mpTargetPaintWindow->GetPreRenderDevice()) if(mpTargetPaintWindow->GetPreRenderDevice())
{ {
mpOut = mpBufferedOut; mpOut = mpBufferedOut;
} }
#endif
// #i74769# use SdrPaintWindow now direct // #i74769# use SdrPaintWindow now direct
Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer); Imp()->GetDrawView()->EndDrawLayers(*mpTargetPaintWindow, bPaintFormLayer);
...@@ -1786,16 +1790,22 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int ...@@ -1786,16 +1790,22 @@ void touch_lo_draw_tile(void * context, int contextWidth, int contextHeight, int
MapMode aMapMode(aDevice.GetMapMode()); MapMode aMapMode(aDevice.GetMapMode());
aMapMode.SetMapUnit(MAP_TWIP); aMapMode.SetMapUnit(MAP_TWIP);
aMapMode.SetOrigin(Point(-tilePosX, -tilePosY)); aMapMode.SetOrigin(Point(-tilePosX, -tilePosY));
// scaling
Fraction scaleX(contextWidth,tileWidth);
Fraction scaleY(contextHeight,tileHeight);
aMapMode.SetScaleX(scaleX);
aMapMode.SetScaleY(scaleY);
aDevice.SetMapMode(aMapMode); aDevice.SetMapMode(aMapMode);
aDevice.SetOutputSizePixel(aDevice.PixelToLogic(Size(contextWidth, contextHeight))); // resizes the virtual device so to contain the entrie context
aDevice.SetOutputSizePixel(Size(contextWidth, contextHeight));
// draw // draw
pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight))); pViewShell->PaintTile(&aDevice, Rectangle(Point(tilePosX, tilePosY), Size(tileWidth, tileHeight)));
// copy the aDevice content to mpImage // copy the aDevice content to mpImage
Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight)))); Bitmap aBitmap(aDevice.GetBitmap(aDevice.PixelToLogic(Point(0,0)), aDevice.PixelToLogic(Size(contextWidth, contextHeight))));
BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess(); BitmapReadAccess * readAccess = aBitmap.AcquireReadAccess();
touch_lo_copy_buffer((void *) readAccess->GetBuffer(), touch_lo_copy_buffer((void *) readAccess->GetBuffer(),
tileWidth, contextWidth,
tileHeight, contextHeight,
readAccess-> GetScanlineSize(), readAccess-> GetScanlineSize(),
context, context,
contextWidth, contextWidth,
......
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