VTK
vtkBrush.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBrush.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
27 #ifndef __vtkBrush_h
28 #define __vtkBrush_h
29 
30 #include "vtkObject.h"
31 #include "vtkColor.h" // Needed for vtkColor4ub
32 
33 class vtkImageData;
34 
36 {
37 public:
38  vtkTypeMacro(vtkBrush, vtkObject);
39  virtual void PrintSelf(ostream &os, vtkIndent indent);
40 
41  static vtkBrush *New();
42 
45  void SetColorF(double color[3]);
46 
49  void SetColorF(double r, double g, double b);
50 
53  void SetColorF(double r, double g, double b, double a);
54 
57  void SetOpacityF(double a);
58 
60  double GetOpacityF();
61 
64  void SetColor(unsigned char color[3]);
65 
68  void SetColor(unsigned char r, unsigned char g, unsigned char b);
69 
71 
73  void SetColor(unsigned char r, unsigned char g, unsigned char b,
74  unsigned char a);
75  void SetColor(const vtkColor4ub &color);
77 
80  void SetOpacity(unsigned char a);
81 
83  unsigned char GetOpacity();
84 
87  void GetColorF(double color[4]);
88 
90  void GetColor(unsigned char color[4]);
91 
93  unsigned char * GetColor() { return &this->Color[0]; }
94 
96  vtkColor4ub GetColorObject();
97 
101  void SetTexture(vtkImageData* image);
102 
104 
105  vtkGetObjectMacro(Texture, vtkImageData);
107 
109 
111  Nearest = 0x01,
112  Linear = 0x02,
113  Stretch = 0x04,
114  Repeat = 0x08
115  };
117 
119 
123  vtkSetMacro(TextureProperties, int);
125 
127 
128  vtkGetMacro(TextureProperties, int);
130 
132  void DeepCopy(vtkBrush *brush);
133 
134 //BTX
135 protected:
136  vtkBrush();
137  ~vtkBrush();
138 
139  // Storage of the color in RGBA format (0-255 per channel).
140  unsigned char* Color;
144 
145 private:
146  vtkBrush(const vtkBrush &); // Not implemented.
147  void operator=(const vtkBrush &); // Not implemented.
148 //ETX
149 };
150 
151 #endif //__vtkBrush_h