VTK
vtkPen.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPen.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 
31 #ifndef vtkPen_h
32 #define vtkPen_h
33 
34 #include "vtkRenderingContext2DModule.h" // For export macro
35 #include "vtkObject.h"
36 #include "vtkColor.h" // Needed for vtkColor4ub
37 
39 {
40 public:
42  virtual void PrintSelf(ostream &os, vtkIndent indent);
43 
44  static vtkPen *New();
45 
46 //BTX
48 
49  enum {
55  DASH_DOT_DOT_LINE};
56 //ETX
58 
61  void SetLineType(int type);
62 
64  int GetLineType();
65 
68  void SetColorF(double color[3]);
69 
72  void SetColorF(double r, double g, double b);
73 
76  void SetColorF(double r, double g, double b, double a);
77 
80  void SetOpacityF(double a);
81 
84  void SetColor(unsigned char color[3]);
85 
88  void SetColor(unsigned char r, unsigned char g, unsigned char b);
89 
91 
93  void SetColor(unsigned char r, unsigned char g, unsigned char b,
94  unsigned char a);
95  void SetColor(const vtkColor4ub &color);
97 
100  void SetOpacity(unsigned char a);
101 
104  void GetColorF(double color[3]);
105 
107  void GetColor(unsigned char color[3]);
108 
111 
114  unsigned char GetOpacity();
115 
117  unsigned char * GetColor() { return this->Color; }
118 
120 
121  vtkSetMacro(Width, float);
122  vtkGetMacro(Width, float);
124 
126  void DeepCopy(vtkPen *pen);
127 
128 //BTX
129 protected:
132 
134 
135  unsigned char* Color;
138 
140  float Width;
141 
143  int LineType;
144 
145 private:
146  vtkPen(const vtkPen &); // Not implemented.
147  void operator=(const vtkPen &); // Not implemented.
148 //ETX
149 };
150 
151 #endif //vtkPen_h
vtkPen::DASH_DOT_LINE
@ DASH_DOT_LINE
Definition: vtkPen.h:54
vtkPen::Width
float Width
Definition: vtkPen.h:140
vtkPen::LineType
int LineType
Definition: vtkPen.h:143
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkPen::GetColorF
void GetColorF(double color[3])
VTKRENDERINGCONTEXT2D_EXPORT
#define VTKRENDERINGCONTEXT2D_EXPORT
Definition: vtkRenderingContext2DModule.h:15
vtkX3D::Color
@ Color
Definition: vtkX3D.h:46
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkPen::PenColor
vtkColor4ub PenColor
Definition: vtkPen.h:136
vtkPen::SetColorF
void SetColorF(double r, double g, double b, double a)
vtkPen::SetColor
void SetColor(const vtkColor4ub &color)
vtkPen::SetColorF
void SetColorF(double r, double g, double b)
vtkPen::GetColorObject
vtkColor4ub GetColorObject()
vtkPen::GetOpacity
unsigned char GetOpacity()
vtkPen::SetColor
void SetColor(unsigned char color[3])
vtkPen::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b)
vtkColor.h
vtkPen::GetColor
unsigned char * GetColor()
Definition: vtkPen.h:117
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPen::SetColorF
void SetColorF(double color[3])
vtkPen::SetColor
void SetColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
vtkPen::DeepCopy
void DeepCopy(vtkPen *pen)
vtkPen::DOT_LINE
@ DOT_LINE
Definition: vtkPen.h:53
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
vtkPen::SOLID_LINE
@ SOLID_LINE
Definition: vtkPen.h:51
vtkObject.h
vtkPen::SetOpacity
void SetOpacity(unsigned char a)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkPen::New
static vtkPen * New()
vtkPen::GetLineType
int GetLineType()
vtkPen::Color
unsigned char * Color
Definition: vtkPen.h:135
vtkgl::r
GLdouble GLdouble GLdouble r
Definition: vtkgl.h:11610
vtkPen::~vtkPen
~vtkPen()
vtkgl::g
GLboolean GLboolean g
Definition: vtkgl.h:12312
vtkPen::NO_PEN
@ NO_PEN
Definition: vtkPen.h:50
vtkColor4ub
Definition: vtkColor.h:209
vtkPen::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkPen::SetOpacityF
void SetOpacityF(double a)
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:39
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkRenderingContext2DModule.h
vtkPen::DASH_LINE
@ DASH_LINE
Definition: vtkPen.h:52
vtkPen::GetColor
void GetColor(unsigned char color[3])
vtkPen::vtkPen
vtkPen()
vtkPen::SetLineType
void SetLineType(int type)