1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 /** \file
18  * \ingroup freestyle
19  */
20 
21 //
22 //  Filename         : TextStrokeRenderer.h
23 //  Author(s)        : Stephane Grabli
24 //  Purpose          : Class to define the text rendering of a stroke
25 //                     Format:
26 //                     x y width height // bbox
27 //                     //list of vertices :
28 //                     t x y z t1 t2 r g b alpha ...
29 //                      ...
30 //  Date of creation : 01/14/2005
31 //
32 ///////////////////////////////////////////////////////////////////////////////
33 
34 #ifndef TEXTSTROKERENDERER_H
35 #define TEXTSTROKERENDERER_H
36 
37 #include <fstream>
38 
39 #include "StrokeRenderer.h"
40 
41 #include "../system/FreestyleConfig.h"
42 
43 namespace Freestyle {
44 
45 /**********************************/
46 /*                                */
47 /*                                */
48 /*         TextStrokeRenderer     */
49 /*                                */
50 /*                                */
51 /**********************************/
52 
53 class TextStrokeRenderer : public StrokeRenderer {
54  public:
55   TextStrokeRenderer(const char *iFileName = NULL);
56   virtual ~TextStrokeRenderer();
57 
58   /*! Renders a stroke rep */
59   virtual void RenderStrokeRep(StrokeRep *iStrokeRep) const;
60   virtual void RenderStrokeRepBasic(StrokeRep *iStrokeRep) const;
61 
62   /*! Closes the output file */
63   void Close();
64 
65  protected:
66   mutable ofstream _ofstream;
67 };
68 
69 } /* namespace Freestyle */
70 
71 #endif  // TEXTSTROKERENDERER_H
72