mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-03 00:14:12 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.7 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 pixelValue;
 | 
						|
      double percentTransparent;
 | 
						|
    };
 | 
						|
    
 | 
						|
    //
 | 
						|
    // Initializer, Accessor and mutator for transparency tables.
 | 
						|
    //
 | 
						|
    /** \brief Mutator for transparentSingleValuePixelList */
 | 
						|
    QList<QgsRasterTransparency::TransparentSingleValuePixel> getTransparentSingleValuePixelList();
 | 
						|
    
 | 
						|
    /** \brief Mutator for transparentThreeValuePixelList */
 | 
						|
    QList<QgsRasterTransparency::TransparentThreeValuePixel> getTransparentThreeValuePixelList();
 | 
						|
    
 | 
						|
    /** \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 getAlphaValue(double, int theGlobalTransparency=255);
 | 
						|
    /** \brief Return the transparency value for a RGB Pixel */
 | 
						|
    int getAlphaValue(double, double, double, int theGlobalTransparency=255);
 | 
						|
};
 |