2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrastertransparency.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
2008-01-11 06:42:56 +00:00
|
|
|
|
|
|
|
class QgsRasterTransparency
|
|
|
|
{
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Defines the list of pixel values to be considered as transparent or semi
|
|
|
|
transparent when rendering rasters.
|
2008-01-11 06:42:56 +00:00
|
|
|
%End
|
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsrastertransparency.h"
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
public:
|
2017-09-11 21:55:20 +10:00
|
|
|
|
2008-01-11 06:42:56 +00:00
|
|
|
QgsRasterTransparency();
|
2017-09-11 21:55:20 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsRasterTransparency.
|
2017-09-11 21:55:20 +10:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2008-01-11 06:42:56 +00:00
|
|
|
struct TransparentThreeValuePixel
|
|
|
|
{
|
|
|
|
double red;
|
|
|
|
double green;
|
|
|
|
double blue;
|
|
|
|
double percentTransparent;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct TransparentSingleValuePixel
|
|
|
|
{
|
2012-08-22 19:40:37 +02:00
|
|
|
double min;
|
|
|
|
double max;
|
2008-01-11 06:42:56 +00:00
|
|
|
double percentTransparent;
|
|
|
|
};
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Accessor for transparentSingleValuePixelList
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Accessor for transparentThreeValuePixelList
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
void initializeTransparentPixelList( double );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Reset to the transparency list to a single value
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
|
|
|
void initializeTransparentPixelList( double, double, double );
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Reset to the transparency list to a single value
|
|
|
|
%End
|
2008-01-11 06:42:56 +00:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
void setTransparentSingleValuePixelList( const QList<QgsRasterTransparency::TransparentSingleValuePixel> &newList /Transfer/ );
|
|
|
|
%Docstring
|
|
|
|
Mutator for transparentSingleValuePixelList
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-02 23:35:10 +02:00
|
|
|
void setTransparentThreeValuePixelList( const QList<QgsRasterTransparency::TransparentThreeValuePixel> &newList /Transfer/ );
|
|
|
|
%Docstring
|
|
|
|
Mutator for transparentThreeValuePixelList
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
int alphaValue( double, int globalTransparency = 255 ) const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the transparency value for a single value Pixel
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-02-21 18:14:58 +01:00
|
|
|
int alphaValue( double, double, double, int globalTransparency = 255 ) const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
Return the transparency value for a RGB Pixel
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2014-10-20 22:50:15 +02:00
|
|
|
bool isEmpty() const;
|
2017-06-02 23:35:10 +02:00
|
|
|
%Docstring
|
|
|
|
True if there are no entries in the pixel lists except the nodata value
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;
|
2017-09-11 21:55:20 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Writes the transparency information to an XML document.
|
2017-09-11 21:55:20 +10:00
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void readXml( const QDomElement &elem );
|
2017-09-11 21:55:20 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Reads the transparency information from an XML document.
|
2017-09-11 21:55:20 +10:00
|
|
|
%End
|
2017-06-02 23:35:10 +02:00
|
|
|
|
2008-01-11 06:42:56 +00:00
|
|
|
};
|
2017-06-02 23:35:10 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/raster/qgsrastertransparency.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|