diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2015-01-19 22:47:01 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-01-28 14:09:29 +0000 |
commit | 9452c709785eb759923167c24e3e72d88b38f029 (patch) | |
tree | c21a3cb205e635e56cc9484cfd5c15ce99b41788 /vcl | |
parent | e930c08494346627f5bf658d46a81c735e3917ec (diff) |
draw polypolygon outline properly (if wanted)
Again, polygons can apparently have curved edges.
Change-Id: I6519da7bb7f0dde7f1550fe6b03c09be127f77d6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index b28602375d56..13bfca963b87 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1212,18 +1212,12 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rP if( UseSolid( mnFillColor, fTransparency ) ) DrawPolyPolygon( rPolyPolygon ); - if( mnLineColor != mnFillColor && UseSolidAA( mnLineColor ) ) + if( mnLineColor != mnFillColor && UseSolid( mnLineColor, fTransparency )) { - for( sal_uInt32 i = 0; i < rPolyPolygon.count(); i++ ) - { - const basegfx::B2DPolygon& polygon = rPolyPolygon.getB2DPolygon( i ); - for( sal_uInt32 j = 0; j < polygon.count(); ++j ) - { - const basegfx::B2DPoint& rPt1 = polygon.getB2DPoint( j ); - const basegfx::B2DPoint& rPt2 = polygon.getB2DPoint(( j + 1 ) % polygon.count()); - DrawLineAA( rPt1.getX(), rPt1.getY(), rPt2.getX(), rPt2.getY()); - } - } + basegfx::B2DTrapezoidVector aB2DTrapVector; + basegfx::tools::createLineTrapezoidFromB2DPolyPolygon( aB2DTrapVector, rPolyPolygon ); + for( size_t i = 0; i < aB2DTrapVector.size(); ++i ) + DrawTrapezoid( aB2DTrapVector[ i ] ); } PostDraw(); |