diff options
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/vcl/bitmapbackbuffer.cxx | 3 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 9 | ||||
-rw-r--r-- | canvas/source/vcl/impltools.hxx | 14 | ||||
-rw-r--r-- | canvas/source/vcl/spritecanvashelper.cxx | 4 | ||||
-rw-r--r-- | canvas/source/vcl/spritedevicehelper.cxx | 1 |
5 files changed, 27 insertions, 4 deletions
diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx index ae3e7cfb5799..0fb9380c6914 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -78,6 +78,7 @@ namespace vclcanvas { // VDev content is more current than bitmap - copy contents before! mpVDev->EnableMapMode( sal_False ); + mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Point aEmptyPoint; *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint, mpVDev->GetOutputSizePixel() ); @@ -98,6 +99,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { mpVDev->EnableMapMode( sal_False ); + mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); aSize = mpVDev->GetOutputSizePixel(); } @@ -141,6 +143,7 @@ namespace vclcanvas { // fill with bitmap content mpVDev->EnableMapMode( sal_False ); + mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Point aEmptyPoint; mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap ); } diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 10a6f5328f01..54fff82b4d74 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -155,6 +155,7 @@ namespace vclcanvas { mp2ndOutDev = rOutDev; mp2ndOutDev->getOutDev().EnableMapMode( sal_False ); + mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); } void CanvasHelper::clear() @@ -166,6 +167,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetLineColor( COL_WHITE ); rOutDev.SetFillColor( COL_WHITE ); rOutDev.SetClipRegion(); @@ -178,6 +180,7 @@ namespace vclcanvas rOutDev2.SetDrawMode( DRAWMODE_DEFAULT ); rOutDev2.EnableMapMode( sal_False ); + rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev2.SetLineColor( COL_WHITE ); rOutDev2.SetFillColor( COL_WHITE ); rOutDev2.SetClipRegion(); @@ -934,6 +937,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); // TODO(F2): Support alpha vdev canvas here const Point aEmptyPoint(0,0); @@ -963,6 +967,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()) ); @@ -1015,6 +1020,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U, @@ -1139,6 +1145,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1176,6 +1183,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1219,6 +1227,7 @@ namespace vclcanvas OutputDevice* p2ndOutDev = NULL; rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); if( mp2ndOutDev ) p2ndOutDev = &mp2ndOutDev->getOutDev(); diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx index 7c2a506181da..7b481c4ab23a 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -123,14 +123,16 @@ namespace vclcanvas public: explicit OutDevStateKeeper( OutputDevice& rOutDev ) : mpOutDev( &rOutDev ), - mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() ) + mbMappingWasEnabled( mpOutDev->IsMapModeEnabled() ), + mnAntiAliasing( mpOutDev->GetAntialiasing() ) { init(); } explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) : mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ), - mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false ) + mbMappingWasEnabled( mpOutDev ? mpOutDev->IsMapModeEnabled() : false ), + mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 ) { init(); } @@ -140,6 +142,8 @@ namespace vclcanvas if( mpOutDev ) { mpOutDev->EnableMapMode( mbMappingWasEnabled ); + mpOutDev->SetAntialiasing( mnAntiAliasing ); + mpOutDev->Pop(); } } @@ -151,11 +155,13 @@ namespace vclcanvas { mpOutDev->Push(); mpOutDev->EnableMapMode(sal_False); + mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); } } - OutputDevice* mpOutDev; - const bool mbMappingWasEnabled; + OutputDevice* mpOutDev; + const bool mbMappingWasEnabled; + const sal_uInt16 mnAntiAliasing; }; ::Point mapRealPoint2D( const ::com::sun::star::geometry::RealPoint2D& rPoint, diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index c62795066f93..185d440d76a5 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -88,6 +88,7 @@ namespace vclcanvas // wouldn't save much render time, and b) will clutter // scrolled sprite content outside this area) rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetClipRegion(Region(rRequestedArea)); // repaint affected sprite directly to output device (at @@ -322,6 +323,7 @@ namespace vclcanvas // flush to screen rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetClipRegion(); rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, @@ -563,6 +565,7 @@ namespace vclcanvas // paint background maVDev->EnableMapMode( sal_False ); + maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); maVDev->SetClipRegion(); maVDev->DrawOutDev( aEmptyPoint, aOutputSize, aOutputPosition, aOutputSize, @@ -580,6 +583,7 @@ namespace vclcanvas // flush to screen rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.DrawOutDev( aOutputPosition, aOutputSize, aEmptyPoint, aOutputSize, *maVDev ); diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 5f89521c35cb..0a0e4b578f0f 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -136,6 +136,7 @@ namespace vclcanvas const ::Point aEmptyPoint; mpBackBuffer->getOutDev().EnableMapMode( sal_False ); + mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); WriteDIB(mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()), aStream, false, true); } |