~ubuntu-branches/ubuntu/trusty/qgis/trusty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 pixelValue;
      double percentTransparent;
    };
    
    //
    // Initializer, Accessor and mutator for transparency tables.
    //
    /** \brief Mutator for transparentSingleValuePixelList */
    QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList();
    
    /** \brief Mutator for transparentThreeValuePixelList */
    QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList();
    
    /** \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);
    /** \brief Return the transparency value for a RGB Pixel */
    int alphaValue(double, double, double, int theGlobalTransparency=255);
};