Kaydet (Commit) 240e5daa authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

opengl: fix fat hairlines - draw hairlines using DrawLineAA

Change-Id: I935bef48fd057e6223dcfc437cbaf2888842fd61
üst 9583020a
......@@ -1347,21 +1347,20 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(
// shortcut for hairline drawing to improve performance
//bool bDrawnOk = true;
if( bIsHairline )
{
// hairlines can be drawn in a simpler way (the linejoin and linecap styles can be ignored)
basegfx::B2DTrapezoidVector aB2DTrapVector;
basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() );
// draw tesselation result
if( aB2DTrapVector.size())
{
PreDraw();
if( UseSolid( mnLineColor, fTransparency ))
if( UseSolidAA( mnLineColor ) )
{
for( size_t i = 0; i < aB2DTrapVector.size(); ++i )
DrawTrapezoid( aB2DTrapVector[ i ] );
sal_uInt32 nPoints = rPolygon.count();
for (sal_uInt32 i = 0; i < nPoints - 1; ++i)
{
const basegfx::B2DPoint& rPt1 = rPolygon.getB2DPoint(i);
const basegfx::B2DPoint& rPt2 = rPolygon.getB2DPoint(i+1);
DrawLineAA(rPt1.getX(), rPt1.getY(),
rPt2.getX(), rPt2.getY());
}
PostDraw();
}
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