Kaydet (Commit) e437b130 authored tarafından Luboš Luňák's avatar Luboš Luňák

try to handle properly fillcolor != linecolor in opengl polypolygons drawing

Change-Id: I962416f48fdb348d8a3d95edf747cfe2f1c929c9
üst 90630adc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment