diff options
Diffstat (limited to 'canvas/source/vcl')
-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 0208550563dc..a8055db4587b 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -85,6 +85,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() ); @@ -105,6 +106,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { mpVDev->EnableMapMode( sal_False ); + mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); aSize = mpVDev->GetOutputSizePixel(); } @@ -148,6 +150,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 461d981d22f7..11bd95df80a7 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -162,6 +162,7 @@ namespace vclcanvas { mp2ndOutDev = rOutDev; mp2ndOutDev->getOutDev().EnableMapMode( sal_False ); + mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); } void CanvasHelper::clear() @@ -173,6 +174,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.DrawRect( Rectangle( Point(), @@ -184,6 +186,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.DrawRect( Rectangle( Point(), @@ -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()) ); @@ -1016,6 +1021,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, @@ -1142,6 +1148,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1179,6 +1186,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1218,6 +1226,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 b5addece52f9..6863f9e99cbe 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -137,14 +137,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(); } @@ -154,6 +156,8 @@ namespace vclcanvas if( mpOutDev ) { mpOutDev->EnableMapMode( mbMappingWasEnabled ); + mpOutDev->SetAntialiasing( mnAntiAliasing ); + mpOutDev->Pop(); } } @@ -165,11 +169,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 11341c616a2d..6832e9043459 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -95,6 +95,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( rRequestedArea ); // repaint affected sprite directly to output device (at @@ -329,6 +330,7 @@ namespace vclcanvas // flush to screen rOutDev.EnableMapMode( sal_False ); + rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetClipRegion(); rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, @@ -574,6 +576,7 @@ namespace vclcanvas // paint background maVDev->EnableMapMode( sal_False ); + maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); maVDev->SetClipRegion(); maVDev->DrawOutDev( aEmptyPoint, aOutputSize, aOutputPosition, aOutputSize, @@ -591,6 +594,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 1281db30c280..c1dac715bd15 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -141,6 +141,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); } |