QGIS API Documentation
3.0.2-Girona (307d082)
|
Defines the list of pixel values to be considered as transparent or semi transparent when rendering rasters. More...
#include <qgsrastertransparency.h>
Classes | |
struct | TransparentSingleValuePixel |
struct | TransparentThreeValuePixel |
Public Member Functions | |
QgsRasterTransparency ()=default | |
Constructor for QgsRasterTransparency. More... | |
int | alphaValue (double, int globalTransparency=255) const |
Returns the transparency value for a single value Pixel. More... | |
int | alphaValue (double, double, double, int globalTransparency=255) const |
Return the transparency value for a RGB Pixel. More... | |
void | initializeTransparentPixelList (double) |
Reset to the transparency list to a single value. More... | |
void | initializeTransparentPixelList (double, double, double) |
Reset to 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) |
Mutator for transparentSingleValuePixelList. More... | |
void | setTransparentThreeValuePixelList (const QList< QgsRasterTransparency::TransparentThreeValuePixel > &newList) |
Mutator for transparentThreeValuePixelList. More... | |
QList< QgsRasterTransparency::TransparentSingleValuePixel > | transparentSingleValuePixelList () const |
Accessor for transparentSingleValuePixelList. More... | |
QList< QgsRasterTransparency::TransparentThreeValuePixel > | transparentThreeValuePixelList () const |
Accessor for transparentThreeValuePixelList. 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.
|
default |
Constructor for QgsRasterTransparency.
int QgsRasterTransparency::alphaValue | ( | double | value, |
int | globalTransparency = 255 |
||
) | const |
Returns the transparency value for a single value Pixel.
Searches through the transparency list, if a match is found, the global transparency value is scaled by the stored transparency value.
value | the needle to search for in the transparency hay stack |
globalTransparency | the overal transparency level for the layer |
Definition at line 99 of file qgsrastertransparency.cpp.
int QgsRasterTransparency::alphaValue | ( | double | redValue, |
double | greenValue, | ||
double | blueValue, | ||
int | globalTransparency = 255 |
||
) | const |
Return 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.
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 overal transparency level for the layer |
Definition at line 139 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::initializeTransparentPixelList | ( | double | value | ) |
Reset to the transparency list to a single value.
Definition at line 46 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::initializeTransparentPixelList | ( | double | redValue, |
double | greenValue, | ||
double | blueValue | ||
) |
Reset to the transparency list to a single value.
Definition at line 62 of file qgsrastertransparency.cpp.
bool QgsRasterTransparency::isEmpty | ( | ) | const |
True if there are no entries in the pixel lists except the nodata value.
Definition at line 175 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::readXml | ( | const QDomElement & | elem | ) |
Reads the transparency information from an XML document.
Definition at line 216 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::setTransparentSingleValuePixelList | ( | const QList< QgsRasterTransparency::TransparentSingleValuePixel > & | newList | ) |
Mutator for transparentSingleValuePixelList.
Mutator for transparentSingleValuePixelList, replaces the whole list.
Definition at line 80 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::setTransparentThreeValuePixelList | ( | const QList< QgsRasterTransparency::TransparentThreeValuePixel > & | newList | ) |
Mutator for transparentThreeValuePixelList.
Mutator for transparentThreeValuePixelList, replaces the whole list.
Definition at line 88 of file qgsrastertransparency.cpp.
QList< QgsRasterTransparency::TransparentSingleValuePixel > QgsRasterTransparency::transparentSingleValuePixelList | ( | ) | const |
Accessor for transparentSingleValuePixelList.
Definition at line 30 of file qgsrastertransparency.cpp.
QList< QgsRasterTransparency::TransparentThreeValuePixel > QgsRasterTransparency::transparentThreeValuePixelList | ( | ) | const |
Accessor for transparentThreeValuePixelList.
Definition at line 38 of file qgsrastertransparency.cpp.
void QgsRasterTransparency::writeXml | ( | QDomDocument & | doc, |
QDomElement & | parentElem | ||
) | const |
Writes the transparency information to an XML document.
Definition at line 180 of file qgsrastertransparency.cpp.