Skip to content

Commit

Permalink
[25d] allow disabling the shadow effect
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 21, 2016
1 parent 4d4ab63 commit fe48485
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/symbology-ng/qgs25drenderer.cpp
Expand Up @@ -83,10 +83,12 @@ Qgs25DRenderer::Qgs25DRenderer()
mSymbol->appendSymbolLayer( walls );
mSymbol->appendSymbolLayer( roof );

QgsEffectStack* effectStack = new QgsEffectStack();
QgsOuterGlowEffect* glowEffect = new QgsOuterGlowEffect();
glowEffect->setBlurLevel( 5 );
glowEffect->setSpreadUnit( QgsSymbolV2::MapUnit );
floor->setPaintEffect( glowEffect );
effectStack->appendEffect( glowEffect );
floor->setPaintEffect( effectStack );

// These methods must only be used after the above initialisation!

Expand Down Expand Up @@ -176,7 +178,8 @@ QgsFillSymbolLayerV2* Qgs25DRenderer::wallLayer() const

QgsOuterGlowEffect* Qgs25DRenderer::glowEffect() const
{
return static_cast<QgsOuterGlowEffect*>( mSymbol->symbolLayer( 0 )->paintEffect() );
QgsEffectStack* stack = static_cast<QgsEffectStack*>( mSymbol->symbolLayer( 0 )->paintEffect() );
return static_cast<QgsOuterGlowEffect*>( stack->effect( 0 ) );
}

bool Qgs25DRenderer::shadowEnabled() const
Expand Down

0 comments on commit fe48485

Please sign in to comment.