VTK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
home
boeckb
code
depot
group-kitware
vtk
build-release
Utilities
Doxygen
dox
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
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
36
class
VTKRENDERINGCONTEXT2D_EXPORT
vtkBrush
:
public
vtkObject
37
{
38
public
:
39
vtkTypeMacro(
vtkBrush
,
vtkObject
);
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
97
vtkColor4ub
GetColorObject();
98
102
void
SetTexture(
vtkImageData
*
image
);
103
105
106
vtkGetObjectMacro(Texture,
vtkImageData
);
108
110
111
enum
TextureProperty
{
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
:
137
vtkBrush
();
138
~
vtkBrush
();
139
140
// Storage of the color in RGBA format (0-255 per channel).
141
unsigned
char
*
Color
;
142
vtkColor4ub
BrushColor
;
143
vtkImageData
*
Texture
;
144
int
TextureProperties
;
145
146
private
:
147
vtkBrush
(
const
vtkBrush
&);
// Not implemented.
148
void
operator=(
const
vtkBrush
&);
// Not implemented.
149
//ETX
150
};
151
152
#endif //vtkBrush_h
vtkX3D::color
Definition:
vtkX3D.h:221
vtkColor.h
vtkObject
abstract base class for most VTK objects
Definition:
vtkObject.h:61
vtkpiston::DeepCopy
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
vtkBrush::GetColor
unsigned char * GetColor()
Definition:
vtkBrush.h:94
vtkBrush
provides a brush that fills shapes drawn by vtkContext2D.
Definition:
vtkBrush.h:36
vtkObject::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
VTKRENDERINGCONTEXT2D_EXPORT
#define VTKRENDERINGCONTEXT2D_EXPORT
Definition:
vtkRenderingContext2DModule.h:15
vtkColor4ub
Definition:
vtkColor.h:208
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:38
vtkBrush::BrushColor
vtkColor4ub BrushColor
Definition:
vtkBrush.h:142
vtkImageData
topologically and geometrically regular array of data
Definition:
vtkImageData.h:44
vtkX3D::Color
Definition:
vtkX3D.h:46
vtkBrush::TextureProperty
TextureProperty
Definition:
vtkBrush.h:111
vtkX3D::image
Definition:
vtkX3D.h:374
vtkRenderingContext2DModule.h
vtkObject::New
static vtkObject * New()
vtkObject.h
vtkBrush::Texture
vtkImageData * Texture
Definition:
vtkBrush.h:143
vtkBrush::TextureProperties
int TextureProperties
Definition:
vtkBrush.h:144
vtkBrush::Color
unsigned char * Color
Definition:
vtkBrush.h:141
Generated by
1.8.9.1