@@ -365,17 +365,34 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape( const QString& name, QPolygonF
365
365
}
366
366
else if ( name == " pentagon" )
367
367
{
368
+ /* angular-representation of hardcoded values used
368
369
polygon << QPointF( sin( DEG2RAD( 288.0 ) ), - cos( DEG2RAD( 288.0 ) ) )
369
370
<< QPointF( sin( DEG2RAD( 216.0 ) ), - cos( DEG2RAD( 216.0 ) ) )
370
371
<< QPointF( sin( DEG2RAD( 144.0 ) ), - cos( DEG2RAD( 144.0 ) ) )
371
372
<< QPointF( sin( DEG2RAD( 72.0 ) ), - cos( DEG2RAD( 72.0 ) ) )
373
+ << QPointF( 0, -1 ); */
374
+ polygon << QPointF ( -0.9511 , -0.3090 )
375
+ << QPointF ( -0.5878 , 0.8090 )
376
+ << QPointF ( 0.5878 , 0.8090 )
377
+ << QPointF ( 0.9511 , -0.3090 )
372
378
<< QPointF ( 0 , -1 );
373
379
return true ;
374
380
}
375
381
else if ( name == " hexagon" )
376
382
{
377
- polygon << QPointF ( -1 , 0.5 ) << QPointF ( 0 , 1 ) << QPointF ( 1 , 0.5 )
378
- << QPointF ( 1 , -0.5 ) << QPointF ( 0 , -1 ) << QPointF ( -1 , -0.5 );
383
+ /* angular-representation of hardcoded values used
384
+ polygon << QPointF( sin( DEG2RAD( 300.0 ) ), - cos( DEG2RAD( 300.0 ) ) )
385
+ << QPointF( sin( DEG2RAD( 240.0 ) ), - cos( DEG2RAD( 240.0 ) ) )
386
+ << QPointF( sin( DEG2RAD( 180.0 ) ), - cos( DEG2RAD( 180.0 ) ) )
387
+ << QPointF( sin( DEG2RAD( 120.0 ) ), - cos( DEG2RAD( 120.0 ) ) )
388
+ << QPointF( sin( DEG2RAD( 60.0 ) ), - cos( DEG2RAD( 60.0 ) ) )
389
+ << QPointF( 0, -1 ); */
390
+ polygon << QPointF ( -0.8660 , -0.5 )
391
+ << QPointF ( -0.8660 , 0.5 )
392
+ << QPointF ( 0 , 1 )
393
+ << QPointF ( 0.8660 , 0.5 )
394
+ << QPointF ( 0.8660 , -0.5 )
395
+ << QPointF ( 0 , -1 );
379
396
return true ;
380
397
}
381
398
else if ( name == " triangle" )
@@ -385,8 +402,12 @@ bool QgsSimpleMarkerSymbolLayerV2::prepareShape( const QString& name, QPolygonF
385
402
}
386
403
else if ( name == " equilateral_triangle" )
387
404
{
405
+ /* angular-representation of hardcoded values used
388
406
polygon << QPointF( sin( DEG2RAD( 240.0 ) ), - cos( DEG2RAD( 240.0 ) ) )
389
407
<< QPointF( sin( DEG2RAD( 120.0 ) ), - cos( DEG2RAD( 120.0 ) ) )
408
+ << QPointF( 0, -1 ); */
409
+ polygon << QPointF ( -0.8660 , 0.5 )
410
+ << QPointF ( 0.8660 , 0.5 )
390
411
<< QPointF ( 0 , -1 );
391
412
return true ;
392
413
}
0 commit comments