QGIS/python/core/raster/qgsrastertransparency.sip
Juergen E. Fischer f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00

63 lines
1.9 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 Mutator for transparentSingleValuePixelList */
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;
/** \brief Mutator 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 Accessor for transparentSingleValuePixelList */
void setTransparentSingleValuePixelList( QList<QgsRasterTransparency::TransparentSingleValuePixel> );
/** \brief Accessor for transparentThreeValuePixelList */
void setTransparentThreeValuePixelList( QList<QgsRasterTransparency::TransparentThreeValuePixel> );
/** \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( double nodataValue ) const;
void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
void readXML( const QDomElement& elem );
};