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 "vtkRenderingContext2DModule.h" // For export macro
31 #include "vtkObject.h"
32 #include "vtkColor.h" // Needed for vtkColor4ub
33 
34 class vtkImageData;
35 
37 {
38 public:
40  virtual void PrintSelf(ostream &os, vtkIndent indent);
41 
42  static vtkBrush *New();
43 
46  void SetColorF(double color[3]);
47 
50  void SetColorF(double r, double g, double b);
51 
54  void SetColorF(double r, double g, double b, double a);
55 
58  void SetOpacityF(double a);
59 
61  double GetOpacityF();
62 
65  void SetColor(unsigned char color[3]);
66 
69  void SetColor(unsigned char r, unsigned char g, unsigned char b);
70 
72 
74  void SetColor(unsigned char r, unsigned char g, unsigned char b,
75  unsigned char a);
76  void SetColor(const vtkColor4ub &color);
78 
81  void SetOpacity(unsigned char a);
82 
84  unsigned char GetOpacity();
85 
88  void GetColorF(double color[4]);
89 
91  void GetColor(unsigned char color[4]);
92 
94  unsigned char * GetColor() { return &this->Color[0]; }
95 
98 
103 
105 
108 
110 
112  Nearest = 0x01,
113  Linear = 0x02,
114  Stretch = 0x04,
115  Repeat = 0x08
116  };
118 
120 
124  vtkSetMacro(TextureProperties, int);
126 
128 
129  vtkGetMacro(TextureProperties, int);
131 
133  void DeepCopy(vtkBrush *brush);
134 
135 //BTX
136 protected:
139 
140  // Storage of the color in RGBA format (0-255 per channel).
141  unsigned char* Color;
145 
146 private:
147  vtkBrush(const vtkBrush &); // Not implemented.
148  void operator=(const vtkBrush &); // Not implemented.
149 //ETX
150 };
151 
152 #endif //vtkBrush_h
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition: vtkBrush.h:37
vtkBrush::Texture
vtkImageData * Texture
Definition: vtkBrush.h:143
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkBrush::SetColorF
void SetColorF(double color[3])
vtkBrush::TextureProperties
int TextureProperties
Definition: vtkBrush.h:144
VTKRENDERINGCONTEXT2D_EXPORT
#define VTKRENDERINGCONTEXT2D_EXPORT
Definition: vtkRenderingContext2DModule.h:15
vtkBrush::GetColor
unsigned char * GetColor()
Definition: vtkBrush.h:94
vtkX3D::Color
@ Color
Definition: vtkX3D.h:46
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkBrush::GetOpacity
unsigned char GetOpacity()
vtkBrush::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b)
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkBrush::New
static vtkBrush * New()
vtkBrush::Color
unsigned char * Color
Definition: vtkBrush.h:141
vtkBrush::SetOpacity
void SetOpacity(unsigned char a)
vtkBrush::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
vtkBrush::SetColor
void SetColor(unsigned char color[3])
vtkBrush::SetColorF
void SetColorF(double r, double g, double b)
vtkBrush::SetOpacityF
void SetOpacityF(double a)
vtkBrush::BrushColor
vtkColor4ub BrushColor
Definition: vtkBrush.h:142
vtkBrush::GetOpacityF
double GetOpacityF()
vtkBrush::GetColorF
void GetColorF(double color[4])
vtkBrush::SetColorF
void SetColorF(double r, double g, double b, double a)
vtkBrush::~vtkBrush
~vtkBrush()
vtkBrush::GetColor
void GetColor(unsigned char color[4])
vtkColor.h
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkgl::color
GLuint color
Definition: vtkgl.h:12351
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkObject.h
vtkBrush::SetColor
void SetColor(const vtkColor4ub &color)
vtkBrush::vtkBrush
vtkBrush()
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkgl::r
GLdouble GLdouble GLdouble r
Definition: vtkgl.h:11610
vtkgl::g
GLboolean GLboolean g
Definition: vtkgl.h:12312
vtkColor4ub
Definition: vtkColor.h:209
vtkBrush::GetColorObject
vtkColor4ub GetColorObject()
vtkBrush::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkRenderingContext2DModule.h
vtkBrush::TextureProperty
TextureProperty
Definition: vtkBrush.h:111
vtkgl::image
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: vtkgl.h:11341
vtkBrush::SetTexture
void SetTexture(vtkImageData *image)
vtkBrush::DeepCopy
void DeepCopy(vtkBrush *brush)