Salome HOME
Initial version
[modules/gui.git] / src / VTKViewer / VTKViewer_VectorText.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile$
5   Language:  C++
6   Date:      $Date$
7   Version:   $Revision$
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkVectorText - create polygonal text
19 // .SECTION Description
20
21 // vtkVectorText generates vtkPolyData from an input text string. Besides the
22 // ASCII alphanumeric characters a-z, A-Z, 0-9, vtkVectorText also supports
23 // ASCII punctuation marks. (The supported ASCII character set are the codes
24 // (33-126) inclusive.) The only control character supported is the line feed
25 // character "\n", which advances to a new line.
26 //
27 // To use thie class, you normally couple it with a vtkPolyDataMapper and a
28 // vtkActor. In this case you would use the vtkActor's transformation methods
29 // to position, orient, and scale the text. You may also wish to use a
30 // vtkFollower to orient the text so that it always faces the camera.
31
32 // .SECTION See Also
33 // vtkTextMapper vtkCaptionActor2D
34
35 // VTKViewer_VectorText.h is a copy of vtkVectorText.h file.
36 // Purpose of copying: to remove linking to libHybrid.so VTK library 
37
38 #ifndef __VTKViewer_VectorText_h
39 #define __VTKViewer_VectorText_h
40
41 #include "vtkPolyDataSource.h"
42
43 class VTKViewer_VectorText : public vtkPolyDataSource 
44 {
45 public:
46   static VTKViewer_VectorText *New();
47   vtkTypeRevisionMacro(VTKViewer_VectorText,vtkPolyDataSource);
48   void PrintSelf(ostream& os, vtkIndent indent);
49
50   // Description:
51   // Set/Get the text to be drawn.
52   vtkSetStringMacro(Text);
53   vtkGetStringMacro(Text);
54
55 protected:
56   VTKViewer_VectorText();
57   ~VTKViewer_VectorText();
58
59   void Execute();
60   char *Text;
61   char *Letters[127];
62
63 };
64
65 #endif
66
67