Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsrastertransparency.h
Go to the documentation of this file.
1 /* **************************************************************************
2  qgsrastertransparency.h - description
3  -------------------
4 begin : Mon Nov 30 2007
5 copyright : (C) 2007 by Peter J. Ersts
6 email : ersts@amnh.org
7 
8 ****************************************************************************/
9 
10 /* **************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 #ifndef QGSRASTERTRANSPARENCY_H
19 #define QGSRASTERTRANSPARENCY_H
20 
25 class CORE_EXPORT QgsRasterTransparency
26 {
27 
28  public:
30 
31  //
32  // Structs to hold transparent pixel vlaues
33  //
35  {
36  double red;
37  double green;
38  double blue;
40  };
41 
43  {
44  double pixelValue;
46  };
47 
48  //
49  // Initializer, Accessor and mutator for transparency tables.
50  //
52  QList<QgsRasterTransparency::TransparentSingleValuePixel> transparentSingleValuePixelList() const;
53 
55  QList<QgsRasterTransparency::TransparentThreeValuePixel> transparentThreeValuePixelList() const;
56 
58  void initializeTransparentPixelList( double );
59 
61  void initializeTransparentPixelList( double, double, double );
62 
64  void setTransparentSingleValuePixelList( QList<QgsRasterTransparency::TransparentSingleValuePixel> );
65 
67  void setTransparentThreeValuePixelList( QList<QgsRasterTransparency::TransparentThreeValuePixel> );
68 
70  int alphaValue( double, int theGlobalTransparency = 255 ) const;
71 
73  int alphaValue( double, double, double, int theGlobalTransparency = 255 ) const;
74 
75  private:
77  QList<QgsRasterTransparency::TransparentThreeValuePixel> mTransparentThreeValuePixelList;
78 
80  QList<QgsRasterTransparency::TransparentSingleValuePixel> mTransparentSingleValuePixelList;
81 
82 };
83 #endif