VTK
9.0.1
Rendering
Context2D
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
28
#ifndef vtkBrush_h
29
#define vtkBrush_h
30
31
#include "
vtkColor.h
"
// Needed for vtkColor4ub
32
#include "
vtkObject.h
"
33
#include "vtkRenderingContext2DModule.h"
// For export macro
34
35
class
vtkImageData
;
36
37
class
VTKRENDERINGCONTEXT2D_EXPORT
vtkBrush
:
public
vtkObject
38
{
39
public
:
40
vtkTypeMacro(
vtkBrush
,
vtkObject
);
41
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
42
43
static
vtkBrush
*
New
();
44
49
void
SetColorF(
double
color
[3]);
50
55
void
SetColorF(
double
r,
double
g,
double
b);
56
61
void
SetColorF(
double
r,
double
g,
double
b,
double
a);
62
67
void
SetOpacityF(
double
a);
68
72
double
GetOpacityF();
73
78
void
SetColor(
unsigned
char
color
[3]);
79
84
void
SetColor(
unsigned
char
r,
unsigned
char
g,
unsigned
char
b);
85
87
91
void
SetColor(
unsigned
char
r,
unsigned
char
g,
unsigned
char
b,
unsigned
char
a);
92
void
SetColor(
const
vtkColor4ub
&
color
);
94
99
void
SetOpacity(
unsigned
char
a);
100
104
unsigned
char
GetOpacity();
105
109
void
GetColorF(
double
color
[4]);
110
114
void
GetColor(
unsigned
char
color
[4]);
115
119
unsigned
char
*
GetColor
() {
return
&this->
Color
[0]; }
120
124
vtkColor4ub
GetColorObject();
125
132
void
SetTexture(
vtkImageData
*
image
);
133
135
138
vtkGetObjectMacro(Texture,
vtkImageData
);
140
144
enum
TextureProperty
145
{
146
Nearest = 0x01,
147
Linear = 0x02,
148
Stretch = 0x04,
149
Repeat = 0x08
150
};
151
153
160
vtkSetMacro(TextureProperties,
int
);
162
164
167
vtkGetMacro(TextureProperties,
int
);
169
173
void
DeepCopy(
vtkBrush
* brush);
174
175
protected
:
176
vtkBrush
();
177
~
vtkBrush
()
override
;
178
179
// Storage of the color in RGBA format (0-255 per channel).
180
unsigned
char
*
Color
;
181
vtkColor4ub
BrushColor
;
182
vtkImageData
*
Texture
;
183
int
TextureProperties
;
184
185
private
:
186
vtkBrush
(
const
vtkBrush
&) =
delete
;
187
void
operator=(
const
vtkBrush
&) =
delete
;
188
};
189
190
#endif // vtkBrush_h
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition:
vtkBrush.h:37
vtkBrush::Texture
vtkImageData * Texture
Definition:
vtkBrush.h:182
vtkBrush::TextureProperties
int TextureProperties
Definition:
vtkBrush.h:183
vtkBrush::GetColor
unsigned char * GetColor()
Get the color of the brush - gives a pointer to the underlying data.
Definition:
vtkBrush.h:119
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkX3D::image
@ image
Definition:
vtkX3D.h:380
vtkX3D::Color
@ Color
Definition:
vtkX3D.h:52
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:62
vtkBrush::Color
unsigned char * Color
Definition:
vtkBrush.h:180
vtkBrush::BrushColor
vtkColor4ub BrushColor
Definition:
vtkBrush.h:181
vtkX3D::color
@ color
Definition:
vtkX3D.h:227
vtkColor.h
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:33
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject.h
vtkColor4ub
Definition:
vtkColor.h:264
vtkBrush::TextureProperty
TextureProperty
Texture properties.
Definition:
vtkBrush.h:144
Generated on Thu Jun 25 2020 08:30:56 for VTK by
1.8.17