Salome HOME
Update from BR_V5_DEV 13Feb2009
[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 // .NAME vtkVectorText - create polygonal text
18 // .SECTION Description
19
20 // vtkVectorText generates vtkPolyData from an input text string. Besides the
21 // ASCII alphanumeric characters a-z, A-Z, 0-9, vtkVectorText also supports
22 // ASCII punctuation marks. (The supported ASCII character set are the codes
23 // (33-126) inclusive.) The only control character supported is the line feed
24 // character "\n", which advances to a new line.
25 //
26 // To use thie class, you normally couple it with a vtkPolyDataMapper and a
27 // vtkActor. In this case you would use the vtkActor's transformation methods
28 // to position, orient, and scale the text. You may also wish to use a
29 // vtkFollower to orient the text so that it always faces the camera.
30
31 // .SECTION See Also
32 // vtkTextMapper vtkCaptionActor2D
33
34 // VTKViewer_VectorText.h is a copy of vtkVectorText.h file.
35 // Purpose of copying: to remove linking to libHybrid.so VTK library 
36
37 // Modified by Open CASCADE SAS (www.opencascade.com)
38
39 #ifndef __VTKViewer_VectorText_h
40 #define __VTKViewer_VectorText_h
41
42 #include "vtkPolyDataSource.h"
43 /*!Generates vtkPolyData from an input text string.
44  *@see vtkVectorText
45  */
46 class VTKViewer_VectorText : public vtkPolyDataSource 
47 {
48 public:
49   static VTKViewer_VectorText *New();
50   vtkTypeRevisionMacro(VTKViewer_VectorText,vtkPolyDataSource);
51   void PrintSelf(ostream& os, vtkIndent indent);
52
53   // Description:
54   // Set/Get the text to be drawn.
55   vtkSetStringMacro(Text);
56   vtkGetStringMacro(Text);
57
58 protected:
59   VTKViewer_VectorText();
60   ~VTKViewer_VectorText();
61
62   //! Main method, which calculate output
63   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
64
65   char *Text;
66   char *Letters[127];
67
68 };
69
70 #endif
71
72