mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-06 00:07:29 -04:00
Don't render effects which require rasterisation when forcing vector
This commit is contained in:
parent
833582a1f0
commit
3a3eefd66c
@ -33,6 +33,13 @@ void QgsBlurEffect::draw( QgsRenderContext &context )
|
||||
if ( !enabled() || !context.painter() || source().isNull() )
|
||||
return;
|
||||
|
||||
if ( context.rasterizedRenderingPolicy() == Qgis::RasterizedRenderingPolicy::ForceVector )
|
||||
{
|
||||
//just draw unmodified source, we can't render this effect when forcing vectors
|
||||
drawSource( *context.painter() );
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( mBlurMethod )
|
||||
{
|
||||
case StackBlur:
|
||||
|
@ -40,6 +40,13 @@ void QgsColorEffect::draw( QgsRenderContext &context )
|
||||
if ( !enabled() || !context.painter() || source().isNull() )
|
||||
return;
|
||||
|
||||
if ( context.rasterizedRenderingPolicy() == Qgis::RasterizedRenderingPolicy::ForceVector )
|
||||
{
|
||||
//just draw unmodified source, we can't render this effect when forcing vectors
|
||||
drawSource( *context.painter() );
|
||||
return;
|
||||
}
|
||||
|
||||
QPainter *painter = context.painter();
|
||||
|
||||
//rasterize source and apply modifications
|
||||
|
@ -44,6 +44,13 @@ void QgsGlowEffect::draw( QgsRenderContext &context )
|
||||
if ( !enabled() || !context.painter() || source().isNull() )
|
||||
return;
|
||||
|
||||
if ( context.rasterizedRenderingPolicy() == Qgis::RasterizedRenderingPolicy::ForceVector )
|
||||
{
|
||||
//just draw unmodified source, we can't render this effect when forcing vectors
|
||||
drawSource( *context.painter() );
|
||||
return;
|
||||
}
|
||||
|
||||
QImage im = sourceAsImage( context ).copy();
|
||||
|
||||
QgsColorRamp *ramp = nullptr;
|
||||
|
@ -35,6 +35,13 @@ void QgsShadowEffect::draw( QgsRenderContext &context )
|
||||
if ( context.feedback() && context.feedback()->isCanceled() )
|
||||
return;
|
||||
|
||||
if ( context.rasterizedRenderingPolicy() == Qgis::RasterizedRenderingPolicy::ForceVector )
|
||||
{
|
||||
//just draw unmodified source, we can't render this effect when forcing vectors
|
||||
drawSource( *context.painter() );
|
||||
return;
|
||||
}
|
||||
|
||||
QImage colorisedIm = sourceAsImage( context ).copy();
|
||||
|
||||
if ( context.feedback() && context.feedback()->isCanceled() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user