]> SALOME platform Git repositories - modules/gui.git/blob - src/VTKViewer/VTKViewer_VectorText.h
Salome HOME
8ce64cdd4d1f1787736fff2448d51423a97e15f8
[modules/gui.git] / src / VTKViewer / VTKViewer_VectorText.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/
18 //
19 /*=========================================================================
20
21   Program:   Visualization Toolkit
22   Module:    $RCSfile$
23   Language:  C++
24   Date:      $Date$
25   Version:   $Revision$
26
27   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
28   All rights reserved.
29   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
30
31      This software is distributed WITHOUT ANY WARRANTY; without even 
32      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
33      PURPOSE.  See the above copyright notice for more information.
34
35 =========================================================================*/
36 // .NAME vtkVectorText - create polygonal text
37 // .SECTION Description
38
39 // vtkVectorText generates vtkPolyData from an input text string. Besides the
40 // ASCII alphanumeric characters a-z, A-Z, 0-9, vtkVectorText also supports
41 // ASCII punctuation marks. (The supported ASCII character set are the codes
42 // (33-126) inclusive.) The only control character supported is the line feed
43 // character "\n", which advances to a new line.
44 //
45 // To use thie class, you normally couple it with a vtkPolyDataMapper and a
46 // vtkActor. In this case you would use the vtkActor's transformation methods
47 // to position, orient, and scale the text. You may also wish to use a
48 // vtkFollower to orient the text so that it always faces the camera.
49
50 // .SECTION See Also
51 // vtkTextMapper vtkCaptionActor2D
52
53 // VTKViewer_VectorText.h is a copy of vtkVectorText.h file.
54 // Purpose of copying: to remove linking to libHybrid.so VTK library 
55
56 #ifndef __VTKViewer_VectorText_h
57 #define __VTKViewer_VectorText_h
58
59 #include "vtkPolyDataSource.h"
60 /*!Generates vtkPolyData from an input text string.
61  *@see vtkVectorText
62  */
63 class VTKViewer_VectorText : public vtkPolyDataSource 
64 {
65 public:
66   static VTKViewer_VectorText *New();
67   vtkTypeRevisionMacro(VTKViewer_VectorText,vtkPolyDataSource);
68   void PrintSelf(ostream& os, vtkIndent indent);
69
70   // Description:
71   // Set/Get the text to be drawn.
72   vtkSetStringMacro(Text);
73   vtkGetStringMacro(Text);
74
75 protected:
76   VTKViewer_VectorText();
77   ~VTKViewer_VectorText();
78
79   void Execute();
80   char *Text;
81   char *Letters[127];
82
83 };
84
85 #endif
86
87