mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Boost test coverage of geometry classes
This commit is contained in:
parent
395ed9307b
commit
cbca7c97bc
@ -626,12 +626,12 @@ void QgsCurvePolygon::removeInteriorRings( double minimumAllowedArea )
|
|||||||
|
|
||||||
void QgsCurvePolygon::draw( QPainter &p ) const
|
void QgsCurvePolygon::draw( QPainter &p ) const
|
||||||
{
|
{
|
||||||
|
if ( !mExteriorRing )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( mInteriorRings.empty() )
|
if ( mInteriorRings.empty() )
|
||||||
{
|
{
|
||||||
if ( mExteriorRing )
|
mExteriorRing->drawAsPolygon( p );
|
||||||
{
|
|
||||||
mExteriorRing->drawAsPolygon( p );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -4304,7 +4304,20 @@ class TestQgsGeometry(unittest.TestCase):
|
|||||||
'wkt': 'CircularString (20 30, 50 30, 50 90)',
|
'wkt': 'CircularString (20 30, 50 30, 50 90)',
|
||||||
'reference_image': 'circularstring',
|
'reference_image': 'circularstring',
|
||||||
'as_polygon_reference_image': 'circularstring_aspolygon',
|
'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:
|
for test in tests:
|
||||||
|
BIN
tests/testdata/control_images/geometry/expected_compoundcurve/expected_compoundcurve.png
vendored
Normal file
BIN
tests/testdata/control_images/geometry/expected_compoundcurve/expected_compoundcurve.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 597 B |
Binary file not shown.
After Width: | Height: | Size: 541 B |
Binary file not shown.
After Width: | Height: | Size: 582 B |
Binary file not shown.
After Width: | Height: | Size: 643 B |
Loading…
x
Reference in New Issue
Block a user