diff options
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r-- | vcl/source/outdev/line.cxx | 10 | ||||
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 9 | ||||
-rw-r--r-- | vcl/source/outdev/polyline.cxx | 35 | ||||
-rw-r--r-- | vcl/source/outdev/transparent.cxx | 3 |
4 files changed, 17 insertions, 40 deletions
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 6507c43408ed..f965f0fdd1fc 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -108,8 +108,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) InitLineColor(); // #i101598# support AA and snap for lines, too - if((mnAntialiasing & AntialiasingFlags::Enable) - && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) + if( mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor()) { @@ -151,8 +150,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo ) { - const bool bTryAA((mnAntialiasing & AntialiasingFlags::Enable) - && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) + const bool bTryB2d(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor()); basegfx::B2DPolyPolygon aFillPolyPolygon; @@ -234,7 +232,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin const bool bPixelSnapHairline(mnAntialiasing & AntialiasingFlags::PixelSnapHairline); bool bDone(false); - if(bTryAA) + if(bTryB2d) { bDone = mpGraphics->DrawPolyLine( basegfx::B2DHomMatrix(), @@ -272,7 +270,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin bool bDone(false); - if(bTryAA) + if(bTryB2d) { bDone = mpGraphics->DrawPolyPolygon( basegfx::B2DHomMatrix(), diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 996af41c0506..4d76578d376a 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -62,8 +62,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && + if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) { @@ -182,8 +181,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && + if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) { @@ -292,8 +290,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP bool bSuccess(false); - if((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && + if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) { diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index e9b01f987f80..e52e42cc8ce6 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -117,8 +117,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rL // #i101491# // Try direct Fallback to B2D-Version of DrawPolyLine - if((mnAntialiasing & AntialiasingFlags::Enable) && - LineStyle::Solid == rLineInfo.GetStyle()) + if(LineStyle::Solid == rLineInfo.GetStyle()) { DrawPolyLine( rPoly.getB2DPolygon(), @@ -219,25 +218,13 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, SetFillColor(aOldFillColor); InitFillColor(); - const bool bTryAA((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && - RasterOp::OverPaint == GetRasterOp() && - IsLineColor()); - // when AA it is necessary to also paint the filled polygon's outline // to avoid optical gaps for(auto const& rPolygon : aAreaPolyPolygon) { (void)DrawPolyLineDirectInternal( basegfx::B2DHomMatrix(), - rPolygon, - 0.0, - 0.0, - nullptr, // MM01 - basegfx::B2DLineJoin::NONE, - css::drawing::LineCap_BUTT, - basegfx::deg2rad(15.0) /*default, not used*/, - bTryAA); + rPolygon); } } else @@ -308,11 +295,10 @@ bool OutputDevice::DrawPolyLineDirect( const std::vector< double >* pStroke, // MM01 basegfx::B2DLineJoin eLineJoin, css::drawing::LineCap eLineCap, - double fMiterMinimumAngle, - bool bBypassAACheck) + double fMiterMinimumAngle) { if(DrawPolyLineDirectInternal(rObjectTransform, rB2DPolygon, fLineWidth, fTransparency, - pStroke, eLineJoin, eLineCap, fMiterMinimumAngle, bBypassAACheck)) + pStroke, eLineJoin, eLineCap, fMiterMinimumAngle)) { // Worked, add metafile action (if recorded). This is done only here, // because this function is public, other OutDev functions already add metafile @@ -342,8 +328,7 @@ bool OutputDevice::DrawPolyLineDirectInternal( const std::vector< double >* pStroke, // MM01 basegfx::B2DLineJoin eLineJoin, css::drawing::LineCap eLineCap, - double fMiterMinimumAngle, - bool bBypassAACheck) + double fMiterMinimumAngle) { assert(!is_double_buffered_window()); @@ -364,13 +349,11 @@ bool OutputDevice::DrawPolyLineDirectInternal( if( mbInitLineColor ) InitLineColor(); - const bool bTryAA( bBypassAACheck || - ((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && + const bool bTryB2d(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && - IsLineColor())); + IsLineColor()); - if(bTryAA) + if(bTryB2d) { // combine rObjectTransform with WorldToDevice const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation() * rObjectTransform); @@ -395,7 +378,7 @@ bool OutputDevice::DrawPolyLineDirectInternal( if (mpAlphaVDev) mpAlphaVDev->DrawPolyLineDirect(rObjectTransform, rB2DPolygon, fLineWidth, fTransparency, pStroke, eLineJoin, eLineCap, - fMiterMinimumAngle, bBypassAACheck); + fMiterMinimumAngle); return true; } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index e7864820b6ba..b2496a726086 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -232,8 +232,7 @@ void OutputDevice::DrawTransparent( if( mbInitFillColor ) InitFillColor(); - if((mnAntialiasing & AntialiasingFlags::Enable) && - mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && + if(mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && (RasterOp::OverPaint == GetRasterOp()) ) { // b2dpolygon support not implemented yet on non-UNX platforms |