diff options
author | Armin Le Grand <alg@apache.org> | 2013-01-23 13:27:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-14 16:00:13 +0100 |
commit | 9bb96049addebd8907854730713d8a3f5f033e34 (patch) | |
tree | 35d257ff64e579fbcd19767c744e1672704fda79 /canvas | |
parent | 39fee18a1142850107b49cf0823cfdb85743aa49 (diff) |
Resolves: #i121534# Reintegrating changes for rotated bitmap support
(cherry picked from commit b2cc0de3fc9adee90787ca760e86869f9255b380)
Conflicts:
canvas/source/vcl/spritecanvashelper.cxx
drawinglayer/Library_drawinglayer.mk
drawinglayer/source/processor2d/vclhelperbitmaprender.cxx
drawinglayer/source/processor2d/vclhelperbitmaprender.hxx
drawinglayer/source/processor2d/vclhelperbitmaptransform.cxx
drawinglayer/source/processor2d/vclhelperbitmaptransform.hxx
drawinglayer/source/processor2d/vclprocessor2d.cxx
officecfg/registry/schema/org/openoffice/Office/Draw.xcs
svx/source/svdraw/svdograf.cxx
vcl/aqua/source/gdi/salgdi.cxx
vcl/inc/aqua/salgdi.h
vcl/inc/os2/salgdi.h
vcl/inc/salgdi.hxx
vcl/inc/unx/pspgraphics.h
vcl/inc/vcl/bitmapex.hxx
vcl/inc/vcl/outdev.hxx
vcl/inc/vcl/salbtype.hxx
vcl/os2/source/gdi/salgdi2.cxx
vcl/source/gdi/bitmapex.cxx
vcl/source/gdi/outdev2.cxx
vcl/source/gdi/salgdilayout.cxx
vcl/source/gdi/salmisc.cxx
vcl/unx/generic/gdi/pspgraphics.cxx
vcl/unx/generic/gdi/salgdi2.cxx
vcl/unx/headless/svpgdi.cxx
vcl/unx/headless/svpgdi.hxx
vcl/unx/headless/svppspgraphics.cxx
vcl/unx/headless/svppspgraphics.hxx
vcl/win/source/gdi/salbmp.cxx
vcl/win/source/gdi/salgdi.cxx
vcl/win/source/gdi/salgdi3.cxx
vcl/win/source/gdi/salgdi_gdiplus.cxx
vcl/win/source/gdi/winlayout.cxx
Change-Id: I871d1d107b019758f3913e5eb63bc9bc0ba403fd
Do not name unused arguments to prevent compiler warnings.
(cherry picked from commit f3118889a0cd941f193e9b6557c0792015d77a34)
Change-Id: I482d1f96d695c7bf9912ec464bb39e7fdd14adef
Related: #i121534# fix graphite-enabled windows build
(cherry picked from commit c90a6ca92b1239d01a2892e15488e4a183a88b1a)
Conflicts:
vcl/win/source/gdi/winlayout.cxx
Change-Id: I95fd41ad6f7187f34ba9474674a471fb4fc65314
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); } |