Update tests

This commit is contained in:
Nyall Dawson 2021-10-22 12:13:23 +10:00
parent afd215428d
commit a4c61f0390
5 changed files with 8 additions and 0 deletions

View File

@ -3558,6 +3558,10 @@ void QgsPointPatternFillSymbolLayer::renderPolygon( const QPolygonF &points, con
_renderPolygon( p, points, rings, context );
}
// if invalid parameters, skip out
if ( qgsDoubleNear( width, 0 ) || qgsDoubleNear( height, 0 ) || width < 0 || height < 0 )
return;
p->save();
QPainterPath path;

View File

@ -161,9 +161,13 @@ void TestQgsPointPatternFillSymbol::pointPatternFillSymbolVector()
QgsMarkerSymbol *pointSymbol = QgsMarkerSymbol::createSimple( properties );
mPointPatternFill->setSubSymbol( pointSymbol );
mPointPatternFill->setDistanceX( 10 );
mPointPatternFill->setDistanceY( 10 );
mMapSettings.setFlag( Qgis::MapSettingsFlag::ForceVectorOutput, true );
const bool res = imageCheck( "symbol_pointfill_vector" );
mMapSettings.setFlag( Qgis::MapSettingsFlag::ForceVectorOutput, false );
mPointPatternFill->setDistanceX( 15 );
mPointPatternFill->setDistanceY( 15 );
QVERIFY( res );
// also confirm that output is indeed vector!

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 KiB

After

Width:  |  Height:  |  Size: 626 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 KiB

After

Width:  |  Height:  |  Size: 626 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 626 KiB

After

Width:  |  Height:  |  Size: 626 KiB