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 "vtkObject.h"
35 #include "vtkColor.h" // Needed for vtkColor4ub
36 
38 {
39 public:
40  vtkTypeMacro(vtkPen, vtkObject);
41  virtual void PrintSelf(ostream &os, vtkIndent indent);
42 
43  static vtkPen *New();
44 
45 //BTX
47 
48  enum {
54  DASH_DOT_DOT_LINE};
55 //ETX
57 
60  void SetLineType(int type);
61 
63  int GetLineType();
64 
67  void SetColorF(double color[3]);
68 
71  void SetColorF(double r, double g, double b);
72 
75  void SetColorF(double r, double g, double b, double a);
76 
79  void SetOpacityF(double a);
80 
83  void SetColor(unsigned char color[3]);
84 
87  void SetColor(unsigned char r, unsigned char g, unsigned char b);
88 
90 
92  void SetColor(unsigned char r, unsigned char g, unsigned char b,
93  unsigned char a);
94  void SetColor(const vtkColor4ub &color);
96 
99  void SetOpacity(unsigned char a);
100 
103  void GetColorF(double color[3]);
104 
106  void GetColor(unsigned char color[3]);
107 
109  vtkColor4ub GetColorObject();
110 
113  unsigned char GetOpacity();
114 
116  unsigned char * GetColor() { return this->Color; }
117 
119 
120  vtkSetMacro(Width, float);
121  vtkGetMacro(Width, float);
123 
125  void DeepCopy(vtkPen *pen);
126 
127 //BTX
128 protected:
129  vtkPen();
130  ~vtkPen();
131 
133 
134  unsigned char* Color;
137 
139  float Width;
140 
142  int LineType;
143 
144 private:
145  vtkPen(const vtkPen &); // Not implemented.
146  void operator=(const vtkPen &); // Not implemented.
147 //ETX
148 };
149 
150 #endif //__vtkPen_h
#define VTK_CHARTS_EXPORT
abstract base class for most VTK objects
Definition: vtkObject.h:60
float Width
Definition: vtkPen.h:139
unsigned char * GetColor()
Definition: vtkPen.h:116
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkColor4ub PenColor
Definition: vtkPen.h:135
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:37
unsigned char * Color
Definition: vtkPen.h:134
int LineType
Definition: vtkPen.h:142
static vtkObject * New()