QGIS API Documentation
2.6.0-Brighton
|
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 () | |
QList < QgsRasterTransparency::TransparentSingleValuePixel > | transparentSingleValuePixelList () const |
Accessor for transparentSingleValuePixelList. | |
QList < QgsRasterTransparency::TransparentThreeValuePixel > | transparentThreeValuePixelList () const |
Accessor for transparentThreeValuePixelList. | |
void | initializeTransparentPixelList (double) |
Reset to the transparency list to a single value. | |
void | initializeTransparentPixelList (double, double, double) |
Reset to the transparency list to a single value. | |
void | setTransparentSingleValuePixelList (QList< QgsRasterTransparency::TransparentSingleValuePixel >) |
Mutator for transparentSingleValuePixelList. | |
void | setTransparentThreeValuePixelList (QList< QgsRasterTransparency::TransparentThreeValuePixel >) |
Mutator for transparentThreeValuePixelList. | |
int | alphaValue (double, int theGlobalTransparency=255) const |
Returns the transparency value for a single value Pixel. | |
int | alphaValue (double, double, double, int theGlobalTransparency=255) const |
Return the transparency value for a RGB Pixel. | |
bool | isEmpty () const |
True if there are no entries in the pixel lists except the nodata value. | |
void | writeXML (QDomDocument &doc, QDomElement &parentElem) const |
void | readXML (const QDomElement &elem) |
Defines the list of pixel values to be considered as transparent or semi transparent when rendering rasters.
QgsRasterTransparency::QgsRasterTransparency | ( | ) |
int QgsRasterTransparency::alphaValue | ( | double | theValue, |
int | theGlobalTransparency = 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.
theValue | the needle to search for in the transparency hay stack |
theGlobalTransparency | the overal transparency level for the layer |
int QgsRasterTransparency::alphaValue | ( | double | theRedValue, |
double | theGreenValue, | ||
double | theBlueValue, | ||
int | theGlobalTransparency = 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.
theRedValue | the red portion of the needle to search for in the transparency hay stack |
theGreenValue | the green portion of the needle to search for in the transparency hay stack |
theBlueValue | the green portion of the needle to search for in the transparency hay stack |
theGlobalTransparency | the overal transparency level for the layer |
void QgsRasterTransparency::initializeTransparentPixelList | ( | double | theValue | ) |
Reset to the transparency list to a single value.
void QgsRasterTransparency::initializeTransparentPixelList | ( | double | theRedValue, |
double | theGreenValue, | ||
double | theBlueValue | ||
) |
Reset to the transparency list to a single value.
bool QgsRasterTransparency::isEmpty | ( | ) | const |
True if there are no entries in the pixel lists except the nodata value.
void QgsRasterTransparency::readXML | ( | const QDomElement & | elem | ) |
void QgsRasterTransparency::setTransparentSingleValuePixelList | ( | QList< QgsRasterTransparency::TransparentSingleValuePixel > | theNewList | ) |
Mutator for transparentSingleValuePixelList.
Mutator for transparentSingleValuePixelList, replaces the whole list.
void QgsRasterTransparency::setTransparentThreeValuePixelList | ( | QList< QgsRasterTransparency::TransparentThreeValuePixel > | theNewList | ) |
Mutator for transparentThreeValuePixelList.
Mutator for transparentThreeValuePixelList, replaces the whole list.
QList< QgsRasterTransparency::TransparentSingleValuePixel > QgsRasterTransparency::transparentSingleValuePixelList | ( | ) | const |
Accessor for transparentSingleValuePixelList.
QList< QgsRasterTransparency::TransparentThreeValuePixel > QgsRasterTransparency::transparentThreeValuePixelList | ( | ) | const |
Accessor for transparentThreeValuePixelList.
void QgsRasterTransparency::writeXML | ( | QDomDocument & | doc, |
QDomElement & | parentElem | ||
) | const |