diff options
Diffstat (limited to 'vcl')
35 files changed, 85 insertions, 86 deletions
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index afc4147ce287..8473dc193012 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -620,7 +620,7 @@ public: Size aSizePixel = GetSizePixel(); - mpVDev->SetAntialiasing(AntialiasingFlags::EnableB2dDraw | AntialiasingFlags::PixelSnapHairline); + mpVDev->SetAntialiasing(AntialiasingFlags::Enable | AntialiasingFlags::PixelSnapHairline); mpVDev->SetOutputSizePixel(aSizePixel); mpVDev->SetBackground(Wallpaper(COL_LIGHTGRAY)); mpVDev->Erase(); diff --git a/vcl/backendtest/outputdevice/common.cxx b/vcl/backendtest/outputdevice/common.cxx index 41b7419c29bf..ea71d434a8a0 100644 --- a/vcl/backendtest/outputdevice/common.cxx +++ b/vcl/backendtest/outputdevice/common.cxx @@ -282,7 +282,7 @@ void OutputDeviceTestCommon::initialSetup(long nWidth, long nHeight, Color aColo maVDRectangle = tools::Rectangle(Point(), Size (nWidth, nHeight)); mpVirtualDevice->SetOutputSizePixel(maVDRectangle.GetSize()); if (bEnableAA) - mpVirtualDevice->SetAntialiasing(AntialiasingFlags::EnableB2dDraw | AntialiasingFlags::PixelSnapHairline); + mpVirtualDevice->SetAntialiasing(AntialiasingFlags::Enable | AntialiasingFlags::PixelSnapHairline); else mpVirtualDevice->SetAntialiasing(AntialiasingFlags::NONE); mpVirtualDevice->SetBackground(Wallpaper(aColor)); diff --git a/vcl/backendtest/outputdevice/line.cxx b/vcl/backendtest/outputdevice/line.cxx index 5b5d73261135..3ea81e178d39 100644 --- a/vcl/backendtest/outputdevice/line.cxx +++ b/vcl/backendtest/outputdevice/line.cxx @@ -93,7 +93,7 @@ Bitmap OutputDeviceTestLine::setupAALines() { initialSetup(13, 13, constBackgroundColor); - mpVirtualDevice->SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + mpVirtualDevice->SetAntialiasing(AntialiasingFlags::Enable); mpVirtualDevice->SetLineColor(constLineColor); mpVirtualDevice->SetFillColor(); diff --git a/vcl/backendtest/outputdevice/polygon.cxx b/vcl/backendtest/outputdevice/polygon.cxx index 8d207ade9b64..e5eb16e0c220 100644 --- a/vcl/backendtest/outputdevice/polygon.cxx +++ b/vcl/backendtest/outputdevice/polygon.cxx @@ -121,7 +121,7 @@ Bitmap OutputDeviceTestPolygon::setupAALines() { initialSetup(13, 13, constBackgroundColor); - mpVirtualDevice->SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + mpVirtualDevice->SetAntialiasing(AntialiasingFlags::Enable); mpVirtualDevice->SetLineColor(constLineColor); mpVirtualDevice->SetFillColor(); diff --git a/vcl/backendtest/outputdevice/polyline.cxx b/vcl/backendtest/outputdevice/polyline.cxx index e1d1fd9e0ae0..438cccf09810 100644 --- a/vcl/backendtest/outputdevice/polyline.cxx +++ b/vcl/backendtest/outputdevice/polyline.cxx @@ -103,7 +103,7 @@ Bitmap OutputDeviceTestPolyLine::setupAALines() { initialSetup(13, 13, constBackgroundColor); - mpVirtualDevice->SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + mpVirtualDevice->SetAntialiasing(AntialiasingFlags::Enable); mpVirtualDevice->SetLineColor(constLineColor); mpVirtualDevice->SetFillColor(); diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx index 5259b2a8b958..7515a1a136bc 100644 --- a/vcl/headless/CustomWidgetDraw.cxx +++ b/vcl/headless/CustomWidgetDraw.cxx @@ -76,8 +76,8 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart, if (!s_pWidgetImplementation) return false; - bool bOldAA = m_rGraphics.getAntiAliasB2DDraw(); - m_rGraphics.setAntiAliasB2DDraw(true); + bool bOldAA = m_rGraphics.getAntiAlias(); + m_rGraphics.setAntiAlias(true); cairo_t* pCairoContext = m_rGraphics.getCairoContext(false); m_rGraphics.clipRegion(pCairoContext); @@ -295,7 +295,7 @@ bool CustomWidgetDraw::drawNativeControl(ControlType eType, ControlPart ePart, m_rGraphics.releaseCairoContext(pCairoContext, true, aExtents); - m_rGraphics.setAntiAliasB2DDraw(bOldAA); + m_rGraphics.setAntiAlias(bOldAA); return bOK; } diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 1194148da235..83a960a33391 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1334,7 +1334,7 @@ void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) // PixelOffset used: To not mix with possible PixelSnap, cannot do // directly on coordinates as tried before - despite being already 'snapped' // due to being integer. If it would be directly added here, it would be - // 'snapped' again when !getAntiAliasB2DDraw(), losing the (0.5, 0.5) offset + // 'snapped' again when !getAntiAlias(), losing the (0.5, 0.5) offset aPoly.append(basegfx::B2DPoint(nX1, nY1)); aPoly.append(basegfx::B2DPoint(nX2, nY2)); @@ -1350,7 +1350,7 @@ void SvpSalGraphics::drawLine( long nX1, long nY1, long nX2, long nY2 ) cr, aPoly, basegfx::B2DHomMatrix(), - !getAntiAliasB2DDraw(), + !getAntiAlias(), false); applyColor(cr, m_aLineColor); @@ -1374,7 +1374,7 @@ private: // all other values the path data is based on and // need to be compared with to check for data validity bool mbNoJoin; - bool mbAntiAliasB2DDraw; + bool mbAntiAlias; std::vector< double > maStroke; public: @@ -1383,14 +1383,14 @@ public: size_t nSizeMeasure, cairo_t* cr, bool bNoJoin, - bool bAntiAliasB2DDraw, + bool bAntiAlias, const std::vector< double >* pStroke); // MM01 virtual ~SystemDependentData_CairoPath() override; // read access cairo_path_t* getCairoPath() { return mpCairoPath; } bool getNoJoin() const { return mbNoJoin; } - bool getAntiAliasB2DDraw() const { return mbAntiAliasB2DDraw; } + bool getAntiAlias() const { return mbAntiAlias; } const std::vector< double >& getStroke() const { return maStroke; } virtual sal_Int64 estimateUsageInBytes() const override; @@ -1403,12 +1403,12 @@ SystemDependentData_CairoPath::SystemDependentData_CairoPath( size_t nSizeMeasure, cairo_t* cr, bool bNoJoin, - bool bAntiAliasB2DDraw, + bool bAntiAlias, const std::vector< double >* pStroke) : basegfx::SystemDependentData(rSystemDependentDataManager), mpCairoPath(nullptr), mbNoJoin(bNoJoin), - mbAntiAliasB2DDraw(bAntiAliasB2DDraw), + mbAntiAlias(bAntiAlias), maStroke() { // tdf#129845 only create a copy of the path when nSizeMeasure is @@ -1484,7 +1484,7 @@ bool SvpSalGraphics::drawPolyLine( cr, &aExtents, m_aLineColor, - getAntiAliasB2DDraw(), + getAntiAlias(), rObjectToDevice, rPolyLine, fTransparency, @@ -1504,7 +1504,7 @@ bool SvpSalGraphics::drawPolyLine( cairo_t* cr, basegfx::B2DRange* pExtents, const Color& rLineColor, - bool bAntiAliasB2DDraw, + bool bAntiAlias, const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon& rPolyLine, double fTransparency, @@ -1660,7 +1660,7 @@ bool SvpSalGraphics::drawPolyLine( // check data validity if(nullptr == pSystemDependentData_CairoPath->getCairoPath() || pSystemDependentData_CairoPath->getNoJoin() != bNoJoin - || pSystemDependentData_CairoPath->getAntiAliasB2DDraw() != bAntiAliasB2DDraw + || pSystemDependentData_CairoPath->getAntiAlias() != bAntiAlias || bPixelSnapHairline /*tdf#124700*/ ) { // data invalid, forget @@ -1709,7 +1709,7 @@ bool SvpSalGraphics::drawPolyLine( cr, aPolyLine, rObjectToDevice, // ObjectToDevice *without* LineDraw-Offset - !bAntiAliasB2DDraw, + !bAntiAlias, bPixelSnapHairline); } else @@ -1733,7 +1733,7 @@ bool SvpSalGraphics::drawPolyLine( cr, aEdge, rObjectToDevice, // ObjectToDevice *without* LineDraw-Offset - !bAntiAliasB2DDraw, + !bAntiAlias, bPixelSnapHairline); // prepare next step @@ -1750,7 +1750,7 @@ bool SvpSalGraphics::drawPolyLine( nSizeMeasure, cr, bNoJoin, - bAntiAliasB2DDraw, + bAntiAlias, pStroke); } } @@ -1874,7 +1874,7 @@ bool SvpSalGraphics::drawPolyPolygon( if (bHasFill) { - add_polygon_path(cr, rPolyPolygon, rObjectToDevice, !getAntiAliasB2DDraw()); + add_polygon_path(cr, rPolyPolygon, rObjectToDevice, !getAntiAlias()); applyColor(cr, m_aFillColor, fTransparency); // Get FillDamage (will be extended for LineDamage below) @@ -1890,7 +1890,7 @@ bool SvpSalGraphics::drawPolyPolygon( cairo_matrix_init_translate(&aMatrix, 0.5, 0.5); cairo_set_matrix(cr, &aMatrix); - add_polygon_path(cr, rPolyPolygon, rObjectToDevice, !getAntiAliasB2DDraw()); + add_polygon_path(cr, rPolyPolygon, rObjectToDevice, !getAntiAlias()); applyColor(cr, m_aLineColor, fTransparency); @@ -1928,7 +1928,7 @@ bool SvpSalGraphics::drawGradient(const tools::PolyPolygon& rPolyPolygon, const aInputRect.AdjustRight( 1 ); aInputRect.AdjustBottom( 1 ); basegfx::B2DHomMatrix rObjectToDevice; - AddPolygonToPath(cr, tools::Polygon(aInputRect).getB2DPolygon(), rObjectToDevice, !getAntiAliasB2DDraw(), false); + AddPolygonToPath(cr, tools::Polygon(aInputRect).getB2DPolygon(), rObjectToDevice, !getAntiAlias(), false); } else { @@ -1936,7 +1936,7 @@ bool SvpSalGraphics::drawGradient(const tools::PolyPolygon& rPolyPolygon, const for (auto const & rPolygon : aB2DPolyPolygon) { basegfx::B2DHomMatrix rObjectToDevice; - AddPolygonToPath(cr, rPolygon, rObjectToDevice, !getAntiAliasB2DDraw(), false); + AddPolygonToPath(cr, rPolygon, rObjectToDevice, !getAntiAlias(), false); } } @@ -1997,7 +1997,7 @@ bool SvpSalGraphics::implDrawGradient(basegfx::B2DPolyPolygon const & rPolyPolyg basegfx::B2DHomMatrix rObjectToDevice; for (auto const & rPolygon : rPolyPolygon) - AddPolygonToPath(cr, rPolygon, rObjectToDevice, !getAntiAliasB2DDraw(), false); + AddPolygonToPath(cr, rPolygon, rObjectToDevice, !getAntiAlias(), false); cairo_pattern_t* pattern; pattern = cairo_pattern_create_linear(rGradient.maPoint1.getX(), rGradient.maPoint1.getY(), rGradient.maPoint2.getX(), rGradient.maPoint2.getY()); @@ -2341,7 +2341,7 @@ void SvpSalGraphics::invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags) cr, rPoly, basegfx::B2DHomMatrix(), - !getAntiAliasB2DDraw(), + !getAntiAlias(), false); cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); @@ -2491,7 +2491,7 @@ cairo_t* SvpSalGraphics::getCairoContext(bool bXorModeAllowed) const cr = cairo_create(m_pSurface); cairo_set_line_width(cr, 1); cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD); - cairo_set_antialias(cr, getAntiAliasB2DDraw() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE); + cairo_set_antialias(cr, getAntiAlias() ? CAIRO_ANTIALIAS_DEFAULT : CAIRO_ANTIALIAS_NONE); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); // ensure no linear transformation and no PathInfo in local cairo_path_t diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 8ffe104627c4..c88c136f5066 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -109,7 +109,7 @@ public: cairo_t* cr, basegfx::B2DRange* pExtents, const Color& rLineColor, - bool bAntiAliasB2DDraw, + bool bAntiAlias, const basegfx::B2DHomMatrix& rObjectToDevice, const basegfx::B2DPolygon& rPolyLine, double fTransparency, diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 3a8fb1700862..c451bcc8e83f 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -83,8 +83,8 @@ public: /// Check that our mpImpl is OpenGL and return the context, otherwise NULL. rtl::Reference<OpenGLContext> GetOpenGLContext() const; - void setAntiAliasB2DDraw(bool bNew) { m_bAntiAliasB2DDraw = bNew; } - bool getAntiAliasB2DDraw() const { return m_bAntiAliasB2DDraw; } + void setAntiAlias(bool bNew) { m_bAntiAlias = bNew; } + bool getAntiAlias() const { return m_bAntiAlias; } // public SalGraphics methods, the interface to the independent vcl part @@ -600,7 +600,7 @@ private: protected: /// flags which hold the SetAntialiasing() value from OutputDevice - bool m_bAntiAliasB2DDraw : 1; + bool m_bAntiAlias : 1; inline long GetDeviceWidth(const OutputDevice* pOutDev) const; diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index d656d5fdf789..6c1164c3b577 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -731,7 +731,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices); CHECK_GL_ERROR(); - if( blockAA || !mrParent.getAntiAliasB2DDraw()) + if( blockAA || !mrParent.getAntiAlias()) return; // Make the edges antialiased by drawing the edge lines again with AA. @@ -776,7 +776,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const tools::Polygon& rPolygon, b mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices); CHECK_GL_ERROR(); - if( blockAA || !mrParent.getAntiAliasB2DDraw()) + if( blockAA || !mrParent.getAntiAlias()) return; // Make the edges antialiased by drawing the edge lines again with AA. @@ -828,7 +828,7 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoi mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices); CHECK_GL_ERROR(); - if( blockAA || !mrParent.getAntiAliasB2DDraw()) + if( blockAA || !mrParent.getAntiAlias()) return; // Make the edges antialiased by drawing the edge lines again with AA. @@ -1536,7 +1536,7 @@ void OpenGLSalGraphicsImpl::drawPixel(long nX, long nY, Color nColor) void OpenGLSalGraphicsImpl::drawLine(long nX1, long nY1, long nX2, long nY2) { VCL_GL_INFO("::drawLine (" << nX1 << ", " << nY1 << ") (" << nX2 << ", " << nY2 << ")"); - mpRenderList->addDrawLine(nX1, nY1, nX2, nY2, mnLineColor, mrParent.getAntiAliasB2DDraw()); + mpRenderList->addDrawLine(nX1, nY1, nX2, nY2, mnLineColor, mrParent.getAntiAlias()); PostBatchDraw(); } @@ -1628,7 +1628,7 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( fTransparency, mnLineColor, mnFillColor, - mrParent.getAntiAliasB2DDraw()); + mrParent.getAntiAlias()); PostBatchDraw(); return true; @@ -1700,7 +1700,7 @@ bool OpenGLSalGraphicsImpl::drawPolyLine( eLineCap, fMiterMinimumAngle, mnLineColor, - mrParent.getAntiAliasB2DDraw()); + mrParent.getAntiAlias()); // MM01: not sure - maybe this can be moved out of this loop, but to // keep on the safe side for now, do not really change something for now diff --git a/vcl/qa/cppunit/BackendTest.cxx b/vcl/qa/cppunit/BackendTest.cxx index 631ef0989b76..cb2dca9cfe91 100644 --- a/vcl/qa/cppunit/BackendTest.cxx +++ b/vcl/qa/cppunit/BackendTest.cxx @@ -717,7 +717,7 @@ public: device->SetOutputSizePixel(Size(100, 100)); device->SetBackground(Wallpaper(COL_WHITE)); device->Erase(); - device->SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + device->SetAntialiasing(AntialiasingFlags::Enable); device->SetLineColor(COL_BLACK); basegfx::B2DHomMatrix matrix; // DrawPolyLine() would apply the whole matrix to the line width, making it negative diff --git a/vcl/qa/cppunit/gen/gen.cxx b/vcl/qa/cppunit/gen/gen.cxx index dfcfaa997b80..a82a0717ab80 100644 --- a/vcl/qa/cppunit/gen/gen.cxx +++ b/vcl/qa/cppunit/gen/gen.cxx @@ -92,7 +92,7 @@ CPPUNIT_TEST_FIXTURE(GenTest, testTdf107966) pVirtualDevice->DrawRect(tools::Rectangle(Point(), Size(1350, 225))); pVirtualDevice->SetFillColor(Color(0, 0, 0)); AntialiasingFlags nOldAA = pVirtualDevice->GetAntialiasing(); - pVirtualDevice->SetAntialiasing(nOldAA & ~AntialiasingFlags::EnableB2dDraw); + pVirtualDevice->SetAntialiasing(nOldAA & ~AntialiasingFlags::Enable); // Paint a black polygon on it. basegfx::B2DPolygon aPolygon; diff --git a/vcl/qt5/Qt5Graphics_GDI.cxx b/vcl/qt5/Qt5Graphics_GDI.cxx index 40e5a318a08f..2cbced7ddcab 100644 --- a/vcl/qt5/Qt5Graphics_GDI.cxx +++ b/vcl/qt5/Qt5Graphics_GDI.cxx @@ -142,7 +142,7 @@ bool Qt5Graphics::setClipRegion(const vcl::Region& rRegion) { QPainterPath aPath; const basegfx::B2DPolyPolygon aPolyClip(rRegion.GetAsB2DPolyPolygon()); - AddPolyPolygonToPath(aPath, aPolyClip, !getAntiAliasB2DDraw(), false); + AddPolyPolygonToPath(aPath, aPolyClip, !getAntiAlias(), false); m_aClipPath.swap(aPath); if (!m_aClipRegion.isEmpty()) { @@ -294,8 +294,7 @@ bool Qt5Graphics::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectToDevice, QPainterPath aPath; // ignore empty polygons - if (!AddPolyPolygonToPath(aPath, aPolyPolygon, !getAntiAliasB2DDraw(), - m_aLineColor != SALCOLOR_NONE)) + if (!AddPolyPolygonToPath(aPath, aPolyPolygon, !getAntiAlias(), m_aLineColor != SALCOLOR_NONE)) return true; Qt5Painter aPainter(*this, true, 255 * (1.0 - fTransparency)); @@ -384,7 +383,7 @@ bool Qt5Graphics::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, for (sal_uInt32 a(0); a < aPolyPolygonLine.count(); a++) { const basegfx::B2DPolygon aPolyLine(aPolyPolygonLine.getB2DPolygon(a)); - AddPolygonToPath(aPath, aPolyLine, aPolyLine.isClosed(), !getAntiAliasB2DDraw(), true); + AddPolygonToPath(aPath, aPolyLine, aPolyLine.isClosed(), !getAntiAlias(), true); } Qt5Painter aPainter(*this, false, 255 * (1.0 - fTransparency)); diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx index 3f2ec10bbd30..1e3af5a0d3b3 100644 --- a/vcl/quartz/salgdicommon.cxx +++ b/vcl/quartz/salgdicommon.cxx @@ -823,7 +823,7 @@ bool AquaSalGraphics::drawPolyLine( xPath, aPolyLine, aPolyLine.isClosed(), - !getAntiAliasB2DDraw(), + !getAntiAlias(), true); } @@ -887,7 +887,7 @@ bool AquaSalGraphics::drawPolyPolygon( // the transformation is not used here...) for(auto const& rPolygon : aPolyPolygon) { - AddPolygonToPath( xPath, rPolygon, true, !getAntiAliasB2DDraw(), IsPenVisible() ); + AddPolygonToPath( xPath, rPolygon, true, !getAntiAlias(), IsPenVisible() ); } const CGRect aRefreshRect = CGPathGetBoundingBox( xPath ); @@ -1608,7 +1608,7 @@ bool AquaSalGraphics::setClipRegion( const vcl::Region& i_rClip ) { const basegfx::B2DPolyPolygon aClip(i_rClip.GetAsB2DPolyPolygon()); - AddPolyPolygonToPath( mxClipPath, aClip, !getAntiAliasB2DDraw(), false ); + AddPolyPolygonToPath( mxClipPath, aClip, !getAntiAlias(), false ); } else { diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx index fc384d58f78e..0fff8776fe8f 100644 --- a/vcl/skia/gdiimpl.cxx +++ b/vcl/skia/gdiimpl.cxx @@ -714,7 +714,7 @@ void SkiaSalGraphicsImpl::drawLine(long nX1, long nY1, long nX2, long nY2) addXorRegion(SkRect::MakeLTRB(nX1, nY1, nX2, nY2).makeSorted()); SkPaint paint; paint.setColor(toSkColor(mLineColor)); - paint.setAntiAlias(mParent.getAntiAliasB2DDraw()); + paint.setAntiAlias(mParent.getAntiAlias()); getDrawCanvas()->drawLine(toSkX(nX1), toSkY(nY1), toSkX(nX2), toSkY(nY2), paint); postDraw(); } @@ -729,7 +729,7 @@ void SkiaSalGraphicsImpl::privateDrawAlphaRect(long nX, long nY, long nWidth, lo addXorRegion(SkRect::MakeXYWH(nX, nY, nWidth, nHeight)); SkCanvas* canvas = getDrawCanvas(); SkPaint paint; - paint.setAntiAlias(!blockAA && mParent.getAntiAliasB2DDraw()); + paint.setAntiAlias(!blockAA && mParent.getAntiAlias()); if (mFillColor != SALCOLOR_NONE) { paint.setColor(toSkColorWithTransparency(mFillColor, fTransparency)); @@ -825,7 +825,7 @@ bool SkiaSalGraphicsImpl::drawPolyPolygon(const basegfx::B2DHomMatrix& rObjectTo return true; } - performDrawPolyPolygon(aPolyPolygon, fTransparency, mParent.getAntiAliasB2DDraw()); + performDrawPolyPolygon(aPolyPolygon, fTransparency, mParent.getAntiAlias()); return true; } @@ -908,7 +908,7 @@ bool SkiaSalGraphicsImpl::delayDrawPolyPolygon(const basegfx::B2DPolyPolygon& aP // actually isn't handled here. // Only AA polygons need merging, because they do not line up well because of the AA of the edges. - if (!mParent.getAntiAliasB2DDraw()) + if (!mParent.getAntiAlias()) return false; // Only filled polygons without an outline are problematic. if (mFillColor == SALCOLOR_NONE || mLineColor != SALCOLOR_NONE) @@ -1053,9 +1053,9 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDev aPaint.setColor(toSkColorWithTransparency(mLineColor, fTransparency)); aPaint.setStrokeMiter(fMiterLimit); aPaint.setStrokeWidth(fLineWidth); - aPaint.setAntiAlias(mParent.getAntiAliasB2DDraw()); + aPaint.setAntiAlias(mParent.getAntiAlias()); // See the tdf#134346 comment above. - const SkScalar posFix = mParent.getAntiAliasB2DDraw() ? toSkXYFix : 0; + const SkScalar posFix = mParent.getAntiAlias() ? toSkXYFix : 0; if (pStroke && std::accumulate(pStroke->begin(), pStroke->end(), 0.0) != 0) { @@ -1826,7 +1826,7 @@ bool SkiaSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPolygon, } SkPaint paint; - paint.setAntiAlias(mParent.getAntiAliasB2DDraw()); + paint.setAntiAlias(mParent.getAntiAlias()); paint.setShader(shader); getDrawCanvas()->drawPath(path, paint); postDraw(); @@ -1858,7 +1858,7 @@ bool SkiaSalGraphicsImpl::implDrawGradient(const basegfx::B2DPolyPolygon& rPolyP sk_sp<SkShader> shader = SkGradientShader::MakeLinear(points, colors.data(), pos.data(), colors.size(), SkTileMode::kDecal); SkPaint paint; - paint.setAntiAlias(mParent.getAntiAliasB2DDraw()); + paint.setAntiAlias(mParent.getAntiAlias()); paint.setShader(shader); getDrawCanvas()->drawPath(path, paint); addXorRegion(path.getBounds()); diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index 82dbb49e5d16..539b4f65aff4 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -543,8 +543,8 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart const OUString& /*aCaptions*/, const Color& /*rBackgroundColor*/) { - bool bOldAA = m_rGraphics.getAntiAliasB2DDraw(); - m_rGraphics.setAntiAliasB2DDraw(true); + bool bOldAA = m_rGraphics.getAntiAlias(); + m_rGraphics.setAntiAlias(true); long nWidth = rControlRegion.GetWidth() - 1; long nHeight = rControlRegion.GetHeight() - 1; @@ -730,7 +730,7 @@ bool FileDefinitionWidgetDraw::drawNativeControl(ControlType eType, ControlPart break; } - m_rGraphics.setAntiAliasB2DDraw(bOldAA); + m_rGraphics.setAntiAlias(bOldAA); return bOK; } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 22b516924b2b..257eee5f3f26 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2782,10 +2782,10 @@ bool GDIMetaFile::CreateThumbnail(BitmapEx& rBitmapEx, BmpConversion eColorConve { // initialization seems to be complicated but is used to avoid rounding errors ScopedVclPtrInstance< VirtualDevice > aVDev; - // set EnableB2dDraw to tease the rendering down the code paths which use B2DPolygon and + // set Enable to tease the rendering down the code paths which use B2DPolygon and // avoid integer overflows on scaling tools::Polygon, e.g. moz1545040-1.svg // note: this is similar to DocumentToGraphicRenderer::renderToGraphic - aVDev->SetAntialiasing(AntialiasingFlags::EnableB2dDraw | aVDev->GetAntialiasing()); + aVDev->SetAntialiasing(AntialiasingFlags::Enable | aVDev->GetAntialiasing()); const Point aNullPt; const Point aTLPix( aVDev->LogicToPixel( aNullPt, GetPrefMapMode() ) ); const Point aBRPix( aVDev->LogicToPixel( Point( GetPrefSize().Width() - 1, GetPrefSize().Height() - 1 ), GetPrefMapMode() ) ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 8000bf178c9d..979166f118aa 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -629,7 +629,7 @@ Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) { if(rParameters.getAntiAliase()) { - aVDev->SetAntialiasing(aVDev->GetAntialiasing() | AntialiasingFlags::EnableB2dDraw); + aVDev->SetAntialiasing(aVDev->GetAntialiasing() | AntialiasingFlags::Enable); } if(rParameters.getSnapHorVerLines()) diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index a2b163442187..36ba66d3fbe1 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -539,7 +539,7 @@ bool Printer::AcquireGraphics() const if ( mpGraphics ) { mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp), RasterOp::Invert == meRasterOp ); - mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw)); + mpGraphics->setAntiAlias(bool(mnAntialiasing & AntialiasingFlags::Enable)); } return mpGraphics != nullptr; diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index f277970b6671..5fb6cd6359e1 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -58,7 +58,7 @@ SalGraphics::SalGraphics() : m_nLayout( SalLayoutFlags::NONE ), m_aLastMirror(), m_aLastMirrorW(0), - m_bAntiAliasB2DDraw(false) + m_bAntiAlias(false) { // read global RTL settings if( AllSettings::GetLayoutRTL() ) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 1bb163cda06e..fbedbfba7aea 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -70,7 +70,7 @@ bool VirtualDevice::AcquireGraphics() const if ( mpGraphics ) { mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp), RasterOp::Invert == meRasterOp ); - mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw)); + mpGraphics->setAntiAlias(bool(mnAntialiasing & AntialiasingFlags::Enable)); } return mpGraphics != nullptr; diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index f451b6e1f645..6507c43408ed 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -108,7 +108,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) InitLineColor(); // #i101598# support AA and snap for lines, too - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) + if((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor()) @@ -151,7 +151,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo ) { - const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) + const bool bTryAA((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor()); diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx index 4ab3093b573b..7b1a22a9ce54 100644 --- a/vcl/source/outdev/outdevstate.cxx +++ b/vcl/source/outdev/outdevstate.cxx @@ -249,7 +249,7 @@ void OutputDevice::SetAntialiasing( AntialiasingFlags nMode ) if(mpGraphics) { - mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw)); + mpGraphics->setAntiAlias(bool(mnAntialiasing & AntialiasingFlags::Enable)); } } diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index e031fb05990c..996af41c0506 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -62,7 +62,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + if((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) @@ -182,7 +182,7 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) InitFillColor(); // use b2dpolygon drawing if possible - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + if((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) @@ -292,7 +292,7 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP bool bSuccess(false); - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + if((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && (IsLineColor() || IsFillColor())) diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx index 2a405e5eaf5a..e9b01f987f80 100644 --- a/vcl/source/outdev/polyline.cxx +++ b/vcl/source/outdev/polyline.cxx @@ -117,7 +117,7 @@ void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rL // #i101491# // Try direct Fallback to B2D-Version of DrawPolyLine - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + if((mnAntialiasing & AntialiasingFlags::Enable) && LineStyle::Solid == rLineInfo.GetStyle()) { DrawPolyLine( @@ -219,7 +219,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon, SetFillColor(aOldFillColor); InitFillColor(); - const bool bTryAA((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + const bool bTryAA((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor()); @@ -365,7 +365,7 @@ bool OutputDevice::DrawPolyLineDirectInternal( InitLineColor(); const bool bTryAA( bBypassAACheck || - ((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + ((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && RasterOp::OverPaint == GetRasterOp() && IsLineColor())); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 9c3783fa6512..e7864820b6ba 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -232,7 +232,7 @@ void OutputDevice::DrawTransparent( if( mbInitFillColor ) InitFillColor(); - if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) && + if((mnAntialiasing & AntialiasingFlags::Enable) && mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) && (RasterOp::OverPaint == GetRasterOp()) ) { diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 042e58c3a06a..e9d35f96dd72 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -417,7 +417,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap() aMtf.WindStart(); const AntialiasingFlags nOriginalAA(pPrerenderVDev->GetAntialiasing()); - pPrerenderVDev->SetAntialiasing(nOriginalAA | AntialiasingFlags::EnableB2dDraw); + pPrerenderVDev->SetAntialiasing(nOriginalAA | AntialiasingFlags::Enable); aMtf.Play( pPrerenderVDev.get(), Point( 0, 0 ), aLogicSize ); pPrerenderVDev->SetAntialiasing(nOriginalAA); diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 3d36a9a26ae7..e4b1f53d036f 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -1487,7 +1487,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const tools:: } AntialiasingFlags nAA = rRenderContext.GetAntialiasing(); - rRenderContext.SetAntialiasing(nAA | AntialiasingFlags::PixelSnapHairline | AntialiasingFlags::EnableB2dDraw); + rRenderContext.SetAntialiasing(nAA | AntialiasingFlags::PixelSnapHairline | AntialiasingFlags::Enable); long nWidth = rRect.getWidth(); long nWidthHalf = nWidth / 2; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 4728d594038e..91bdda0fcd5e 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2414,7 +2414,7 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool aPoly.SetPoint(Point(x, y), 3); auto aaflags = rRenderContext.GetAntialiasing(); - rRenderContext.SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + rRenderContext.SetAntialiasing(AntialiasingFlags::Enable); rRenderContext.DrawPolygon( aPoly ); rRenderContext.SetAntialiasing(aaflags); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 444ec4286571..1ba367a6987f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -873,7 +873,7 @@ bool Window::AcquireGraphics() const pSVData->maGDIData.mpLastWinGraphics = const_cast<vcl::Window*>(this); mpGraphics->SetXORMode( (RasterOp::Invert == meRasterOp) || (RasterOp::Xor == meRasterOp), RasterOp::Invert == meRasterOp ); - mpGraphics->setAntiAliasB2DDraw(bool(mnAntialiasing & AntialiasingFlags::EnableB2dDraw)); + mpGraphics->setAntiAlias(bool(mnAntialiasing & AntialiasingFlags::Enable)); } return mpGraphics != nullptr; diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index e4da35f353b1..32e138457dd9 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -168,7 +168,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG if (const cairo_font_options_t* pFontOptions = pSVData->mpDefInst->GetCairoFontOptions()) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - if (!rStyleSettings.GetUseFontAAFromSystem() && !rGraphics.getAntiAliasB2DDraw()) + if (!rStyleSettings.GetUseFontAAFromSystem() && !rGraphics.getAntiAlias()) { // Disable font AA in case global AA setting is supposed to affect // font rendering (not the default) and AA is disabled. diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 5dede8f9dda6..8d5dbbe15443 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -1409,7 +1409,7 @@ bool X11SalGraphicsImpl::drawPolyPolygon( aPolyPolygon.transform(rObjectToDevice); // snap to raster if requested - const bool bSnapToRaster = !mrParent.getAntiAliasB2DDraw(); + const bool bSnapToRaster = !mrParent.getAntiAlias(); if( bSnapToRaster ) aPolyPolygon = basegfx::utils::snapPointsOfHorizontalOrVerticalEdges( aPolyPolygon ); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 719b07ef8f63..eeae83132781 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -606,7 +606,7 @@ bool X11SalGraphics::drawPolyPolygon( if (!m_bOpenGL && !m_bSkia && nullptr != pUseCairoForPolygons && SupportsCairo()) { // snap to raster if requested - const bool bSnapPoints(!getAntiAliasB2DDraw()); + const bool bSnapPoints(!getAntiAlias()); if(bSnapPoints) { @@ -736,7 +736,7 @@ bool X11SalGraphics::drawPolyLine( cr, nullptr, mnPenColor, - getAntiAliasB2DDraw(), + getAntiAlias(), rObjectToDevice, rPolygon, fTransparency, diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 7c52bf36e879..b5964319ab22 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -2148,7 +2148,7 @@ bool WinSalGraphicsImpl::drawPolyPolygon( nullptr); } - if(mrParent.getAntiAliasB2DDraw()) + if(mrParent.getAntiAlias()) { aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias); } @@ -2441,7 +2441,7 @@ bool WinSalGraphicsImpl::drawPolyLine( } } - if(mrParent.getAntiAliasB2DDraw()) + if(mrParent.getAntiAlias()) { aGraphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias); } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 97f8e698ba0c..55846321d5d4 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -264,7 +264,7 @@ public: if (rCtx.meStyle == RENDER_EXPANDED) { AntialiasingFlags nOldAA = rDev.GetAntialiasing(); - rDev.SetAntialiasing(AntialiasingFlags::EnableB2dDraw); + rDev.SetAntialiasing(AntialiasingFlags::Enable); std::vector<tools::Rectangle> aRegions(DemoRenderer::partition(rCtx, 4, 4)); DemoRenderer::clearRects(rDev, aRegions); @@ -1165,7 +1165,7 @@ public: rDev.Push(); AntialiasingFlags nFlags = rDev.GetAntialiasing(); - rDev.SetAntialiasing(nFlags & ~AntialiasingFlags::EnableB2dDraw); + rDev.SetAntialiasing(nFlags & ~AntialiasingFlags::Enable); rDev.SetRasterOp( RasterOp::Xor ); rCtx.mpDemoRenderer->drawThumbs(rDev, r, true); |