Skip to content

Commit

Permalink
Add point pattern fill 0 space test
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 7, 2019
1 parent f214b2c commit bca724f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/src/core/testqgspointpatternfillsymbol.cpp
Expand Up @@ -56,6 +56,7 @@ class TestQgsPointPatternFillSymbol : public QObject
void pointPatternFillSymbol();
void offsettedPointPatternFillSymbol();
void dataDefinedSubSymbol();
void zeroSpacedPointPatternFillSymbol();

private:
bool mTestHasError = false ;
Expand Down Expand Up @@ -185,6 +186,25 @@ void TestQgsPointPatternFillSymbol::dataDefinedSubSymbol()
QVERIFY( imageCheck( "datadefined_subsymbol" ) );
}

void TestQgsPointPatternFillSymbol::zeroSpacedPointPatternFillSymbol()
{
mReport += QLatin1String( "<h2>Zero distance point pattern fill symbol renderer test</h2>\n" );

QgsStringMap properties;
properties.insert( QStringLiteral( "color" ), QStringLiteral( "0,0,0,255" ) );
properties.insert( QStringLiteral( "outline_color" ), QStringLiteral( "#000000" ) );
properties.insert( QStringLiteral( "name" ), QStringLiteral( "circle" ) );
properties.insert( QStringLiteral( "size" ), QStringLiteral( "5.0" ) );
QgsMarkerSymbol *pointSymbol = QgsMarkerSymbol::createSimple( properties );

mPointPatternFill->setSubSymbol( pointSymbol );
mPointPatternFill->setDistanceX( 0 );
mPointPatternFill->setDistanceY( 15 );
mPointPatternFill->setOffsetX( 4 );
mPointPatternFill->setOffsetY( 4 );
QVERIFY( imageCheck( "pointfill_zero_space" ) );
}

//
// Private helper functions not called directly by CTest
//
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bca724f

Please sign in to comment.