mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Save blendmode/composition mode in project file
This commit is contained in:
parent
596dd6b8af
commit
6d4dee914e
@ -124,7 +124,18 @@ class QgsMapRenderer : QObject
|
||||
BlendSoftLight,
|
||||
BlendHardLight,
|
||||
BlendDifference,
|
||||
BlendSubtract
|
||||
BlendSubtract,
|
||||
BlendSource,
|
||||
BlendDestinationOver,
|
||||
BlendClear,
|
||||
BlendDestination,
|
||||
BlendSourceIn,
|
||||
BlendDestinationIn,
|
||||
BlendSourceOut,
|
||||
BlendDestinationOut,
|
||||
BlendSourceAtop,
|
||||
BlendDestinationAtop,
|
||||
BlendXor,
|
||||
};
|
||||
|
||||
//! constructor
|
||||
|
@ -1136,7 +1136,30 @@ QPainter::CompositionMode QgsMapRenderer::getCompositionMode( const QgsMapRender
|
||||
return QPainter::CompositionMode_Difference;
|
||||
case QgsMapRenderer::BlendSubtract:
|
||||
return QPainter::CompositionMode_Exclusion;
|
||||
case QgsMapRenderer::BlendSource:
|
||||
return QPainter::CompositionMode_Source;
|
||||
case QgsMapRenderer::BlendDestinationOver:
|
||||
return QPainter::CompositionMode_DestinationOver;
|
||||
case QgsMapRenderer::BlendClear:
|
||||
return QPainter::CompositionMode_Clear;
|
||||
case QgsMapRenderer::BlendDestination:
|
||||
return QPainter::CompositionMode_Destination;
|
||||
case QgsMapRenderer::BlendSourceIn:
|
||||
return QPainter::CompositionMode_SourceIn;
|
||||
case QgsMapRenderer::BlendDestinationIn:
|
||||
return QPainter::CompositionMode_DestinationIn;
|
||||
case QgsMapRenderer::BlendSourceOut:
|
||||
return QPainter::CompositionMode_SourceOut;
|
||||
case QgsMapRenderer::BlendDestinationOut:
|
||||
return QPainter::CompositionMode_DestinationOut;
|
||||
case QgsMapRenderer::BlendSourceAtop:
|
||||
return QPainter::CompositionMode_SourceAtop;
|
||||
case QgsMapRenderer::BlendDestinationAtop:
|
||||
return QPainter::CompositionMode_DestinationAtop;
|
||||
case QgsMapRenderer::BlendXor:
|
||||
return QPainter::CompositionMode_Xor;
|
||||
default:
|
||||
QgsDebugMsg( QString( "Blend mode %1 mapped to SourceOver" ).arg( blendMode ) );
|
||||
return QPainter::CompositionMode_SourceOver;
|
||||
}
|
||||
}
|
||||
@ -1172,7 +1195,30 @@ QgsMapRenderer::BlendMode QgsMapRenderer::getBlendModeEnum( const QPainter::Comp
|
||||
return QgsMapRenderer::BlendDifference;
|
||||
case QPainter::CompositionMode_Exclusion:
|
||||
return QgsMapRenderer::BlendSubtract;
|
||||
case QPainter::CompositionMode_Source:
|
||||
return QgsMapRenderer::BlendSource;
|
||||
case QPainter::CompositionMode_DestinationOver:
|
||||
return QgsMapRenderer::BlendDestinationOver;
|
||||
case QPainter::CompositionMode_Clear:
|
||||
return QgsMapRenderer::BlendClear;
|
||||
case QPainter::CompositionMode_Destination:
|
||||
return QgsMapRenderer::BlendDestination;
|
||||
case QPainter::CompositionMode_SourceIn:
|
||||
return QgsMapRenderer::BlendSourceIn;
|
||||
case QPainter::CompositionMode_DestinationIn:
|
||||
return QgsMapRenderer::BlendDestinationIn;
|
||||
case QPainter::CompositionMode_SourceOut:
|
||||
return QgsMapRenderer::BlendSourceOut;
|
||||
case QPainter::CompositionMode_DestinationOut:
|
||||
return QgsMapRenderer::BlendDestinationOut;
|
||||
case QPainter::CompositionMode_SourceAtop:
|
||||
return QgsMapRenderer::BlendSourceAtop;
|
||||
case QPainter::CompositionMode_DestinationAtop:
|
||||
return QgsMapRenderer::BlendDestinationAtop;
|
||||
case QPainter::CompositionMode_Xor:
|
||||
return QgsMapRenderer::BlendXor;
|
||||
default:
|
||||
QgsDebugMsg( QString( "Composition mode %1 mapped to Normal" ).arg( blendMode ) );
|
||||
return QgsMapRenderer::BlendNormal;
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +161,18 @@ class CORE_EXPORT QgsMapRenderer : public QObject
|
||||
BlendSoftLight,
|
||||
BlendHardLight,
|
||||
BlendDifference,
|
||||
BlendSubtract
|
||||
BlendSubtract,
|
||||
BlendSource,
|
||||
BlendDestinationOver,
|
||||
BlendClear,
|
||||
BlendDestination,
|
||||
BlendSourceIn,
|
||||
BlendDestinationIn,
|
||||
BlendSourceOut,
|
||||
BlendDestinationOut,
|
||||
BlendSourceAtop,
|
||||
BlendDestinationAtop,
|
||||
BlendXor,
|
||||
};
|
||||
|
||||
//! constructor
|
||||
|
Loading…
x
Reference in New Issue
Block a user