diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2015-01-18 22:49:22 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2015-01-19 12:17:52 +0100 |
commit | e437b13008f458bde2977e754214babdfd210558 (patch) | |
tree | a343737af986b33fa5cd54dd5c70586933fc8e4f /vcl/opengl | |
parent | 90630adcc119dd5adda635146312910e6eb3c0df (diff) |
try to handle properly fillcolor != linecolor in opengl polypolygons drawing
Change-Id: I962416f48fdb348d8a3d95edf747cfe2f1c929c9
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 50d9ec1d2ae7..8a40f1a09b43 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1191,7 +1191,7 @@ void OpenGLSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* } } - if( UseSolidAA( mnLineColor ) ) + if( mnLineColor != mnFillColor && UseSolidAA( mnLineColor ) ) { // TODO Use glMultiDrawElements or primitive restart for( sal_uInt32 i = 0; i < nPoly; i++ ) @@ -1212,6 +1212,20 @@ bool OpenGLSalGraphicsImpl::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rP if( UseSolid( mnFillColor, fTransparency ) ) DrawPolyPolygon( rPolyPolygon ); + if( mnLineColor != mnFillColor && UseSolidAA( mnLineColor ) ) + { + 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()); + } + } + } + PostDraw(); return true; |