Skip to content
Permalink
Browse files

Boost test coverage of geometry classes

  • Loading branch information
nyalldawson committed Sep 22, 2017
1 parent 395ed93 commit cbca7c97bc50ba784e0bbf03f59eb9fa4412dc3b
@@ -626,12 +626,12 @@ void QgsCurvePolygon::removeInteriorRings( double minimumAllowedArea )

void QgsCurvePolygon::draw( QPainter &p ) const
{
if ( !mExteriorRing )
return;

if ( mInteriorRings.empty() )
{
if ( mExteriorRing )
{
mExteriorRing->drawAsPolygon( p );
}
mExteriorRing->drawAsPolygon( p );
}
else
{

Large diffs are not rendered by default.

@@ -4304,7 +4304,20 @@ def testGeometryDraw(self):
'wkt': 'CircularString (20 30, 50 30, 50 90)',
'reference_image': 'circularstring',
'as_polygon_reference_image': 'circularstring_aspolygon',
'use_pen': True}
'use_pen': True},
{'name': 'CurvePolygon',
'wkt': 'CurvePolygon(CircularString (20 30, 50 30, 50 90, 10 50, 20 30))',
'reference_image': 'curvepolygon_circularstring',
'use_pen': False},
{'name': 'CurvePolygonInteriorRings',
'wkt': 'CurvePolygon(CircularString (20 30, 50 30, 50 90, 10 50, 20 30),LineString(30 45, 55 45, 30 75, 30 45))',
'reference_image': 'curvepolygon_circularstring_interiorrings',
'use_pen': False},
{'name': 'CompoundCurve',
'wkt': 'CompoundCurve(CircularString (20 30, 50 30, 50 90),LineString(50 90, 10 90))',
'reference_image': 'compoundcurve',
'use_pen': True,
'as_polygon_reference_image': 'compoundcurve_aspolygon', }
]

for test in tests:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit cbca7c9

Please sign in to comment.
You can’t perform that action at this time.