Skip to content
Permalink
Browse files
partly revert 1d5712c
  • Loading branch information
jef-n committed Jul 25, 2013
1 parent 46db30c commit 3c5980c378546888ab6389a17b047aae75ffdf3d
@@ -188,7 +188,7 @@ QgsSymbolV2* QgsCategorizedSymbolRendererV2::symbolForValue( QVariant value )
}
else
{
QgsDebugMsg( "attribute value not found: " + value.toString() );
QgsDebugMsgLevel( "attribute value not found: " + value.toString(), 3 );
}
return NULL;
}
@@ -462,21 +462,35 @@ void QgsSimpleMarkerSymbolLayerV2::renderPoint( const QPointF& point, QgsSymbolV
// move to the desired position
transform.translate( point.x() + off.x(), point.y() + off.y() );

bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || angleExpression;
if ( angle != 0 && hasDataDefinedRotation )
transform.rotate( angle );

double size = mSize;
QgsExpression* sizeExpression = expression( "size" );
QgsExpression *sizeExpression = expression( "size" );
bool hasDataDefinedSize = context.renderHints() & QgsSymbolV2::DataDefinedSizeScale || sizeExpression;

if ( sizeExpression )
// resize if necessary
if ( hasDataDefinedSize )
{
size = sizeExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toDouble();
double scaledSize = mSize;
if ( sizeExpression )
{
scaledSize = sizeExpression->evaluate( const_cast<QgsFeature*>( context.feature() ) ).toDouble();
}
scaledSize *= QgsSymbolLayerV2Utils::lineWidthScaleFactor( context.renderContext(), mSizeUnit );

switch ( mScaleMethod )
{
case QgsSymbolV2::ScaleArea:
scaledSize = sqrt( scaledSize );
break;
case QgsSymbolV2::ScaleDiameter:
break;
}

double half = scaledSize / 2.0;
transform.scale( half, half );
}
size *= QgsSymbolLayerV2Utils::lineWidthScaleFactor( context.renderContext(), mSizeUnit );

double half = size / 2.0;
transform.scale( half, half );
bool hasDataDefinedRotation = context.renderHints() & QgsSymbolV2::DataDefinedRotation || angleExpression;
if ( angle != 0 && hasDataDefinedRotation )
transform.rotate( angle );

QgsExpression* colorExpression = expression( "color" );
QgsExpression* colorBorderExpression = expression( "color_border" );

0 comments on commit 3c5980c

Please sign in to comment.