Commit 850deab2 authored by Fabio D'Urso's avatar Fabio D'Urso

Allow selection of filled polygons through the filled region

parent 31a163bc
......@@ -1565,6 +1565,16 @@ double LineAnnotationPrivate::distanceSqr( double x, double y, double xScale, do
if ( m_lineClosed ) // Close the path
transformedLinePoints.append( transformedLinePoints.first() );
if ( m_lineInnerColor.isValid() )
{
QPolygonF polygon;
foreach ( const NormalizedPoint &p, transformedLinePoints )
polygon.append( QPointF( p.x, p.y ) );
if ( polygon.containsPoint( QPointF( x, y ), Qt::WindingFill ) )
return 0;
}
return strokeDistance( ::distanceSqr( x, y, xScale, yScale, transformedLinePoints ),
m_style.width() * xScale / ( m_page->m_width * 2 ) );
}
......
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