QGIS/python/core/raster/qgsrastertransparency.sip
Nyall Dawson 4cfacf14e3 Make API more consistent
- rename methods with XML to Xml, CRS to Crs, WMS to Wms, ID to Id
- rename methods with SRS to Crs
- rename methods with abbreviations like "dest" to "destination"
- rename methods with abbreviations like "src" to "source"
2016-07-21 08:40:50 +10:00

63 lines
2.0 KiB
Plaintext

class QgsRasterTransparency
{
%TypeHeaderCode
#include <qgsrastertransparency.h>
%End
public:
QgsRasterTransparency();
//
// Structs to hold transparent pixel vlaues
//
struct TransparentThreeValuePixel
{
double red;
double green;
double blue;
double percentTransparent;
};
struct TransparentSingleValuePixel
{
double min;
double max;
double percentTransparent;
};
//
// Initializer, Accessor and mutator for transparency tables.
//
/** \brief Accessor for transparentSingleValuePixelList */
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;
/** \brief Accessor for transparentThreeValuePixelList */
QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList() const;
/** \brief Reset to the transparency list to a single value */
void initializeTransparentPixelList( double );
/** \brief Reset to the transparency list to a single value */
void initializeTransparentPixelList( double, double, double );
/** \brief Mutator for transparentSingleValuePixelList */
void setTransparentSingleValuePixelList( const QList<QgsRasterTransparency::TransparentSingleValuePixel>& /Transfer/);
/** \brief Mutator for transparentThreeValuePixelList */
void setTransparentThreeValuePixelList( const QList<QgsRasterTransparency::TransparentThreeValuePixel>& /Transfer/);
/** \brief Returns the transparency value for a single value Pixel */
int alphaValue( double, int theGlobalTransparency = 255 ) const;
/** \brief Return the transparency value for a RGB Pixel */
int alphaValue( double, double, double, int theGlobalTransparency = 255 ) const;
/** True if there are no entries in the pixel lists except the nodata value*/
bool isEmpty() const;
void writeXml( QDomDocument& doc, QDomElement& parentElem ) const;
void readXml( const QDomElement& elem );
};