diff options
Diffstat (limited to 'vcl/source/outdev/polygon.cxx')
-rw-r--r-- | vcl/source/outdev/polygon.cxx | 82 |
1 files changed, 47 insertions, 35 deletions
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx index 612e93716bb1..3b9333131133 100644 --- a/vcl/source/outdev/polygon.cxx +++ b/vcl/source/outdev/polygon.cxx @@ -84,21 +84,25 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) if(bSuccess && IsLineColor()) { const basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); + const bool bPixelSnapHairline(mnAntialiasing & AntialiasingFlags::PixelSnapHairline); - if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) - { - aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); - } + // if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) + // { + // aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); + // } for(sal_uInt32 a(0); bSuccess && a < aB2DPolyPolygon.count(); a++) { - bSuccess = mpGraphics->DrawPolyLine( aB2DPolyPolygon.getB2DPolygon(a), - 0.0, - aB2DLineWidth, - basegfx::B2DLineJoin::NONE, - css::drawing::LineCap_BUTT, - 15.0 * F_PI180, // not used with B2DLineJoin::NONE, but the correct default - this); + bSuccess = mpGraphics->DrawPolyLine( + basegfx::B2DHomMatrix(), + aB2DPolyPolygon.getB2DPolygon(a), + 0.0, + aB2DLineWidth, + basegfx::B2DLineJoin::NONE, + css::drawing::LineCap_BUTT, + basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default + bPixelSnapHairline, + this); } } @@ -197,19 +201,23 @@ void OutputDevice::DrawPolygon( const tools::Polygon& rPoly ) if(bSuccess && IsLineColor()) { const basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); - - if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) - { - aB2DPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); - } - - bSuccess = mpGraphics->DrawPolyLine( aB2DPolygon, - 0.0, - aB2DLineWidth, - basegfx::B2DLineJoin::NONE, - css::drawing::LineCap_BUTT, - 15.0 * F_PI180, // not used with B2DLineJoin::NONE, but the correct default - this); + const bool bPixelSnapHairline(mnAntialiasing & AntialiasingFlags::PixelSnapHairline); + + // if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) + // { + // aB2DPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolygon); + // } + + bSuccess = mpGraphics->DrawPolyLine( + basegfx::B2DHomMatrix(), + aB2DPolygon, + 0.0, + aB2DLineWidth, + basegfx::B2DLineJoin::NONE, + css::drawing::LineCap_BUTT, + basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default + bPixelSnapHairline, + this); } if(bSuccess) @@ -300,21 +308,25 @@ void OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP if(bSuccess && IsLineColor()) { const basegfx::B2DVector aB2DLineWidth( 1.0, 1.0 ); + const bool bPixelSnapHairline(mnAntialiasing & AntialiasingFlags::PixelSnapHairline); - if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) - { - aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); - } + // if(mnAntialiasing & AntialiasingFlags::PixelSnapHairline) + // { + // aB2DPolyPolygon = basegfx::tools::snapPointsOfHorizontalOrVerticalEdges(aB2DPolyPolygon); + // } for(sal_uInt32 a(0);bSuccess && a < aB2DPolyPolygon.count(); a++) { - bSuccess = mpGraphics->DrawPolyLine( aB2DPolyPolygon.getB2DPolygon(a), - 0.0, - aB2DLineWidth, - basegfx::B2DLineJoin::NONE, - css::drawing::LineCap_BUTT, - 15.0 * F_PI180, // not used with B2DLineJoin::NONE, but the correct default - this); + bSuccess = mpGraphics->DrawPolyLine( + basegfx::B2DHomMatrix(), + aB2DPolyPolygon.getB2DPolygon(a), + 0.0, + aB2DLineWidth, + basegfx::B2DLineJoin::NONE, + css::drawing::LineCap_BUTT, + basegfx::deg2rad(15.0), // not used with B2DLineJoin::NONE, but the correct default + bPixelSnapHairline, + this); } } |