add simple marker join style tests

This commit is contained in:
nirvn 2016-04-03 11:56:47 +07:00
parent 6ad3537403
commit 3a2a099c59
4 changed files with 42 additions and 0 deletions

View File

@ -59,6 +59,9 @@ class TestQgsSimpleMarkerSymbol : public QObject
void cleanup() {} // will be called after every testfunction.
void simpleMarkerSymbol();
void simpleMarkerSymbolBevelJoin();
void simpleMarkerSymbolMiterJoin();
void simpleMarkerSymbolRoundJoin();
void bounds();
private:
@ -140,6 +143,45 @@ void TestQgsSimpleMarkerSymbol::simpleMarkerSymbol()
QVERIFY( imageCheck( "simplemarker" ) );
}
void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolBevelJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";
mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::BevelJoin );
QVERIFY( imageCheck( "simplemarker_beveljoin" ) );
}
void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolMiterJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";
mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::MiterJoin );
QVERIFY( imageCheck( "simplemarker_miterjoin" ) );
}
void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolRoundJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";
mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::RoundJoin );
QVERIFY( imageCheck( "simplemarker_roundjoin" ) );
}
void TestQgsSimpleMarkerSymbol::bounds()
{
mSimpleMarkerLayer->setColor( QColor( 200, 200, 200 ) );

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB