mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Raster API opacity documentation
This commit is contained in:
parent
32480fe8bd
commit
233a95e99b
@ -29,7 +29,8 @@ const QRgb QgsRasterRenderer::NODATA_COLOR = qRgba( 0, 0, 0, 0 );
|
||||
|
||||
QgsRasterRenderer::QgsRasterRenderer( QgsRasterInterface *input, const QString &type )
|
||||
: QgsRasterInterface( input )
|
||||
, mType( type ), mOpacity( 1.0 ), mRasterTransparency( nullptr )
|
||||
, mType( type )
|
||||
, mRasterTransparency( nullptr )
|
||||
, mAlphaBand( -1 ) //, mInvertColor( false )
|
||||
{
|
||||
}
|
||||
|
@ -64,7 +64,18 @@ class CORE_EXPORT QgsRasterRenderer : public QgsRasterInterface
|
||||
|
||||
bool usesTransparency() const;
|
||||
|
||||
/**
|
||||
* Sets the \a opacity for the renderer, where \a opacity is a value between 0 (totally transparent)
|
||||
* and 1.0 (fully opaque).
|
||||
* \see opacity()
|
||||
*/
|
||||
void setOpacity( double opacity ) { mOpacity = opacity; }
|
||||
|
||||
/**
|
||||
* Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent)
|
||||
* and 1.0 (fully opaque).
|
||||
* \see setOpacity()
|
||||
*/
|
||||
double opacity() const { return mOpacity; }
|
||||
|
||||
void setRasterTransparency( QgsRasterTransparency *t );
|
||||
@ -101,7 +112,7 @@ class CORE_EXPORT QgsRasterRenderer : public QgsRasterInterface
|
||||
QString mType;
|
||||
|
||||
//! Global alpha value (0-1)
|
||||
double mOpacity;
|
||||
double mOpacity = 1.0;
|
||||
//! Raster transparency per color or value. Overwrites global alpha value
|
||||
QgsRasterTransparency *mRasterTransparency = nullptr;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user