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 /vcl/source/outdev | |
parent | 3cbdf64ad5240e6d9a73d4f7e005f7110d5e4002 (diff) |
convert ANTIALIASING constants to scoped enum
Change-Id: I175b8ea4e8bc01c3cdd3dd90506eba01b35e0085
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/font.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/line.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/outdevstate.cxx | 4 | ||||
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 12 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 10 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 4 |
7 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 3e7f00917d51..94d312721674 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1493,7 +1493,7 @@ void OutputDevice::InitFont() const if ( mbInitFont ) { // decide if antialiasing is appropriate - bool bNonAntialiased = (GetAntialiasing() & ANTIALIASING_DISABLE_TEXT) != 0; + bool bNonAntialiased(GetAntialiasing() & AntialiasingFlags::DisableText); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); bNonAntialiased |= ((rStyleSettings.GetDisplayOptions() & DISPLAY_OPTION_AA_DISABLE) != 0); bNonAntialiased |= (int(rStyleSettings.GetAntialiasingMinPixelHeight()) > mpFontEntry->maFontSelData.mnHeight); diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 08348eb762c1..790c285439ab 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -110,7 +110,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) InitLineColor(); // #i101598# support AA and snap for lines, too - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && IsLineColor()) @@ -125,7 +125,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) aB2DPolyLine.append(basegfx::B2DPoint(rEndPt.X(), rEndPt.Y())); aB2DPolyLine.transform( aTransform ); - if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) + if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); } @@ -147,7 +147,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo ) { - const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) + const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && IsLineColor()); diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 5724a8647b73..2ae452e70d63 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -136,7 +136,7 @@ OutputDevice::OutputDevice() : maOverlineColor = Color( COL_TRANSPARENT ); meTextAlign = maFont.GetAlign(); meRasterOp = ROP_OVERPAINT; - mnAntialiasing = 0; + mnAntialiasing = AntialiasingFlags::NONE; meTextLanguage = 0; // TODO: get default from configuration? mbLineColor = true; mbFillColor = true; diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index a6cf8982a48f..1f3039216164 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -267,7 +267,7 @@ void OutputDevice::EnableOutput( bool bEnable ) mpAlphaVDev->EnableOutput( bEnable ); } -void OutputDevice::SetAntialiasing( sal_uInt16 nMode ) +void OutputDevice::SetAntialiasing( AntialiasingFlags nMode ) { if ( mnAntialiasing != nMode ) { @@ -276,7 +276,7 @@ void OutputDevice::SetAntialiasing( sal_uInt16 nMode ) if(mpGraphics) { - mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW); + mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw)); } } diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 36f63ac8e4ba..9741ffaac86e 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -59,7 +59,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && (IsLineColor() || IsFillColor())) @@ -81,7 +81,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { const ::basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); - if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) + if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); } @@ -166,7 +166,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && (IsLineColor() || IsFillColor())) @@ -188,7 +188,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly ) { const ::basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); - if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) + if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { aB2DPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); } @@ -265,7 +265,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP if( mbInitFillColor ) InitFillColor(); - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && (IsLineColor() || IsFillColor())) @@ -287,7 +287,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP { const ::basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); - if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) + if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); } diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 2c50d7243767..b304913df1bd 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -62,7 +62,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly ) // transform the polygon aB2DPolyLine.transform( aTransform ); - if(mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) + if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) { aB2DPolyLine = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyLine); } @@ -108,7 +108,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo // #i101491# // Try direct Fallback to B2D-Version of DrawPolyLine - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && LINE_SOLID == rLineInfo.GetStyle()) { DrawPolyLine( rPoly.getB2DPolygon(), (double)rLineInfo.GetWidth(), rLineInfo.GetLineJoin(), rLineInfo.GetLineCap()); @@ -192,7 +192,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, SetFillColor(aOldFillColor); InitFillColor(); - const bool bTryAA((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && IsLineColor()); @@ -289,7 +289,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon, InitLineColor(); const bool bTryAA( bBypassAACheck || - ((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + ((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && ROP_OVERPAINT == GetRasterOp() && IsLineColor())); @@ -309,7 +309,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon, basegfx::B2DPolygon aB2DPolygon(rB2DPolygon); aB2DPolygon.transform(aTransform); - if((mnAntialiasing & ANTIALIASING_PIXELSNAPHAIRLINE) && + if((mnAntialiasing & AntialiasingFlags::PixelSnapHairline) && aB2DPolygon.count() < 1000) { // #i98289#, #i101491# diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 52d245d13cf0..f51bb64d96eb 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -237,7 +237,7 @@ void OutputDevice::DrawTransparent( const basegfx::B2DPolyPolygon& rB2DPolyPoly, if( mbInitFillColor ) InitFillColor(); - if((mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW) && + if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && mpGraphics->supportsOperation(OutDevSupport_B2DDraw) && (ROP_OVERPAINT == GetRasterOp()) ) { @@ -690,7 +690,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, if( xVDev->SetOutputSizePixel( aDstRect.GetSize() ) ) { - if(GetAntialiasing()) + if(GetAntialiasing() != AntialiasingFlags::NONE) { // #i102109# // For MetaFile replay (see task) it may now be necessary to take |