Defines the list of pixel values to be considered as transparent or semi transparent when rendering rasters.
More...
#include <qgsrastertransparency.h>
|
| QgsRasterTransparency ()=default |
| Constructor for QgsRasterTransparency. More...
|
|
int | alphaValue (double redValue, double greenValue, double blueValue, int globalTransparency=255) const |
| Returns the transparency value for a RGB pixel. More...
|
|
int | alphaValue (double value, int globalTransparency=255) const |
| Returns the transparency value for a single value pixel. More...
|
|
void | initializeTransparentPixelList (double redValue, double greenValue, double blueValue) |
| Resets the transparency list to single red, green, and blue values. More...
|
|
void | initializeTransparentPixelList (double value) |
| Resets the transparency list to a single value. More...
|
|
bool | isEmpty () const |
| True if there are no entries in the pixel lists except the nodata value. More...
|
|
void | readXml (const QDomElement &elem) |
| Reads the transparency information from an XML document. More...
|
|
void | setTransparentSingleValuePixelList (const QList< QgsRasterTransparency::TransparentSingleValuePixel > &newList) |
| Sets the transparent single value pixel list, replacing the whole existing list. More...
|
|
void | setTransparentThreeValuePixelList (const QList< QgsRasterTransparency::TransparentThreeValuePixel > &newList) |
| Sets the transparent three value pixel list, replacing the whole existing list. More...
|
|
QList< QgsRasterTransparency::TransparentSingleValuePixel > | transparentSingleValuePixelList () const |
| Returns the transparent single value pixel list. More...
|
|
QList< QgsRasterTransparency::TransparentThreeValuePixel > | transparentThreeValuePixelList () const |
| Returns the transparent three value pixel list. More...
|
|
void | writeXml (QDomDocument &doc, QDomElement &parentElem) const |
| Writes the transparency information to an XML document. More...
|
|
Defines the list of pixel values to be considered as transparent or semi transparent when rendering rasters.
Definition at line 32 of file qgsrastertransparency.h.
◆ QgsRasterTransparency()
QgsRasterTransparency::QgsRasterTransparency |
( |
| ) |
|
|
default |
◆ alphaValue() [1/2]
int QgsRasterTransparency::alphaValue |
( |
double |
redValue, |
|
|
double |
greenValue, |
|
|
double |
blueValue, |
|
|
int |
globalTransparency = 255 |
|
) |
| const |
Returns the transparency value for a RGB pixel.
Searches through the transparency list, if a match is found, the global transparency value is scaled by the stored transparency value.
- Parameters
-
redValue | the red portion of the needle to search for in the transparency hay stack |
greenValue | the green portion of the needle to search for in the transparency hay stack |
blueValue | the green portion of the needle to search for in the transparency hay stack |
globalTransparency | the overall transparency level for the layer |
Definition at line 106 of file qgsrastertransparency.cpp.
◆ alphaValue() [2/2]
int QgsRasterTransparency::alphaValue |
( |
double |
value, |
|
|
int |
globalTransparency = 255 |
|
) |
| const |
Returns the transparency value for a single value pixel.
Searches through the transparency list, and if a match is found, the global transparency value is scaled by the stored transparency value.
- Parameters
-
value | the needle to search for in the transparency hay stack |
globalTransparency | the overall transparency level for the layer |
Definition at line 74 of file qgsrastertransparency.cpp.
◆ initializeTransparentPixelList() [1/2]
void QgsRasterTransparency::initializeTransparentPixelList |
( |
double |
redValue, |
|
|
double |
greenValue, |
|
|
double |
blueValue |
|
) |
| |
◆ initializeTransparentPixelList() [2/2]
void QgsRasterTransparency::initializeTransparentPixelList |
( |
double |
value | ) |
|
◆ isEmpty()
bool QgsRasterTransparency::isEmpty |
( |
| ) |
const |
◆ readXml()
void QgsRasterTransparency::readXml |
( |
const QDomElement & |
elem | ) |
|
◆ setTransparentSingleValuePixelList()
◆ setTransparentThreeValuePixelList()
◆ transparentSingleValuePixelList()
◆ transparentThreeValuePixelList()
◆ writeXml()
void QgsRasterTransparency::writeXml |
( |
QDomDocument & |
doc, |
|
|
QDomElement & |
parentElem |
|
) |
| const |
The documentation for this class was generated from the following files: