diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-19 12:16:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:09 +0200 |
commit | 456c379ffd8683cd8c22969268900787cf1ac28e (patch) | |
tree | fe340c60faee4799f9ef7002c16ac822c8596dff /canvas | |
parent | convert DRAWMODE constants to scoped enum (diff) | |
download | core-456c379ffd8683cd8c22969268900787cf1ac28e.tar.gz core-456c379ffd8683cd8c22969268900787cf1ac28e.zip |
convert ANTIALIASING constants to scoped enum
Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_textlayout_drawhelper.cxx | 2 | ||||
-rw-r--r-- | canvas/source/vcl/backbuffer.cxx | 4 | ||||
-rw-r--r-- | canvas/source/vcl/bitmapbackbuffer.cxx | 10 | ||||
-rw-r--r-- | canvas/source/vcl/canvascustomsprite.cxx | 4 | ||||
-rw-r--r-- | canvas/source/vcl/canvashelper.cxx | 18 | ||||
-rw-r--r-- | canvas/source/vcl/impltools.hxx | 10 | ||||
-rw-r--r-- | canvas/source/vcl/spritecanvashelper.cxx | 8 | ||||
-rw-r--r-- | canvas/source/vcl/spritedevicehelper.cxx | 6 |
8 files changed, 31 insertions, 31 deletions
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index e9ae26121a45..c46a49ffda25 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -91,7 +91,7 @@ namespace dxcanvas // disable font antialiasing - GDI does not handle alpha // surfaces properly. if( bAlphaSurface ) - aVirtualDevice.SetAntialiasing(ANTIALIASING_DISABLE_TEXT); + aVirtualDevice.SetAntialiasing(AntialiasingFlags::DisableText); if(rText.Length) { diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx index 356caa9254e7..8f3a98054ed7 100644 --- a/canvas/source/vcl/backbuffer.cxx +++ b/canvas/source/vcl/backbuffer.cxx @@ -33,12 +33,12 @@ namespace vclcanvas // #i95645# #if defined( MACOSX ) // use AA on VCLCanvas for Mac - maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | maVDev->GetAntialiasing() ); + maVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | maVDev->GetAntialiasing() ); #else // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); + maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw); #endif } } diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx index bd01d71b5c54..4fd79bc2df33 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -77,7 +77,7 @@ namespace vclcanvas { // VDev content is more current than bitmap - copy contents before! mpVDev->EnableMapMode( false ); - mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); const Point aEmptyPoint; *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint, mpVDev->GetOutputSizePixel() ); @@ -98,7 +98,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { mpVDev->EnableMapMode( false ); - mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); aSize = mpVDev->GetOutputSizePixel(); } @@ -123,12 +123,12 @@ namespace vclcanvas // #i95645# #if defined( MACOSX ) // use AA on VCLCanvas for Mac - mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpVDev->GetAntialiasing() ); + mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpVDev->GetAntialiasing() ); #else // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); + mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw); #endif } } @@ -142,7 +142,7 @@ namespace vclcanvas { // fill with bitmap content mpVDev->EnableMapMode( false ); - mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mpVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); const Point aEmptyPoint; mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap ); } diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx index cb8833696bc7..030c603be189 100644 --- a/canvas/source/vcl/canvascustomsprite.cxx +++ b/canvas/source/vcl/canvascustomsprite.cxx @@ -83,8 +83,8 @@ namespace vclcanvas // antialiasing again, then) // disable font antialiasing (causes ugly shadows otherwise) - pBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT ); - pBackBufferMask->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT ); + pBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText ); + pBackBufferMask->getOutDev().SetAntialiasing( AntialiasingFlags::DisableText ); // set mask vdev drawmode, such that everything is painted // black. That leaves us with a binary image, white for diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 84ba5465b3e2..5f3ee58f21a3 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -155,7 +155,7 @@ namespace vclcanvas { mp2ndOutDev = rOutDev; mp2ndOutDev->getOutDev().EnableMapMode( false ); - mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mp2ndOutDev->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); } void CanvasHelper::clear() @@ -167,7 +167,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); rOutDev.SetLineColor( COL_WHITE ); rOutDev.SetFillColor( COL_WHITE ); rOutDev.SetClipRegion(); @@ -180,7 +180,7 @@ namespace vclcanvas rOutDev2.SetDrawMode( DrawModeFlags::Default ); rOutDev2.EnableMapMode( false ); - rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev2.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); rOutDev2.SetLineColor( COL_WHITE ); rOutDev2.SetFillColor( COL_WHITE ); rOutDev2.SetClipRegion(); @@ -917,7 +917,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); // TODO(F2): Support alpha vdev canvas here const Point aEmptyPoint(0,0); @@ -947,7 +947,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(), aRect.GetSize()) ); @@ -1000,7 +1000,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); const Rectangle aRect( vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); const sal_uInt16 nBitCount( ::std::min( (sal_uInt16)24U, @@ -1125,7 +1125,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1163,7 +1163,7 @@ namespace vclcanvas tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1207,7 +1207,7 @@ namespace vclcanvas OutputDevice* p2ndOutDev = NULL; rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); if( mp2ndOutDev ) p2ndOutDev = &mp2ndOutDev->getOutDev(); diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx index c294efd89ae7..9d5e0b23b675 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -131,7 +131,7 @@ namespace vclcanvas explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) : mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : NULL ), mbMappingWasEnabled( mpOutDev && mpOutDev->IsMapModeEnabled() ), - mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : 0 ) + mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : AntialiasingFlags::NONE ) { init(); } @@ -154,13 +154,13 @@ namespace vclcanvas { mpOutDev->Push(); mpOutDev->EnableMapMode(false); - mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mpOutDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); } } - VclPtr<OutputDevice> mpOutDev; - const bool mbMappingWasEnabled; - const sal_uInt16 mnAntiAliasing; + VclPtr<OutputDevice> mpOutDev; + const bool mbMappingWasEnabled; + const AntialiasingFlags 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 d003736013ed..095dae6ea461 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -88,7 +88,7 @@ namespace vclcanvas // wouldn't save much render time, and b) will clutter // scrolled sprite content outside this area) rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); rOutDev.SetClipRegion(vcl::Region(rRequestedArea)); // repaint affected sprite directly to output device (at @@ -329,7 +329,7 @@ namespace vclcanvas // flush to screen rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); rOutDev.SetClipRegion(); rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, @@ -571,7 +571,7 @@ namespace vclcanvas // paint background maVDev->EnableMapMode( false ); - maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + maVDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); maVDev->SetClipRegion(); maVDev->DrawOutDev( aEmptyPoint, aOutputSize, aOutputPosition, aOutputSize, @@ -589,7 +589,7 @@ namespace vclcanvas // flush to screen rOutDev.EnableMapMode( false ); - rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + rOutDev.SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); rOutDev.DrawOutDev( aOutputPosition, aOutputSize, aEmptyPoint, aOutputSize, *maVDev ); diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 7fedd462c687..076cca0a9a78 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -50,12 +50,12 @@ namespace vclcanvas // #i95645# #if defined( MACOSX ) // use AA on VCLCanvas for Mac - mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | mpBackBuffer->getOutDev().GetAntialiasing() ); + mpBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw | mpBackBuffer->getOutDev().GetAntialiasing() ); #else // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); + mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~AntialiasingFlags::EnableB2dDraw); #endif } @@ -119,7 +119,7 @@ namespace vclcanvas const ::Point aEmptyPoint; mpBackBuffer->getOutDev().EnableMapMode( false ); - mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); + mpBackBuffer->getOutDev().SetAntialiasing( AntialiasingFlags::EnableB2dDraw ); WriteDIB(mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()), aStream, false, true); } |