1 // Created on: 2015-08-10
2 // Created by: Ilya SEVRIKOV
3 // Copyright (c) 2013-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef Font_BRepTextBuilder_Header
17 #define Font_BRepTextBuilder_Header
19 #include <Font_BRepFont.hxx>
20 #include <Font_TextFormatter.hxx>
23 //! Represents class for applying text formatting.
24 class Font_BRepTextBuilder
27 //! Render text as BRep shape.
28 //! @param theString text in UTF-8 encoding
29 //! @param thePenLoc start position and orientation on the baseline
30 //! @param theFormatter formatter which defines alignment for the text
31 //! @return result shape with pen transformation applied as shape location
32 Standard_EXPORT TopoDS_Shape Perform (Font_BRepFont& theFont,
33 const Font_TextFormatter& theFormatter,
34 const gp_Ax3& thePenLoc = gp_Ax3());
35 //! Render text as BRep shape.
36 //! @param theString text in UTF-8 encoding
37 //! @param thePenLoc start position and orientation on the baseline
38 //! @param theHAlign horizontal alignment of the text
39 //! @param theVAlign vertical alignment of the text
40 //! @return result shape with pen transformation applied as shape location
41 Standard_EXPORT TopoDS_Shape Perform (Font_BRepFont& theFont,
42 const NCollection_String& theString,
43 const gp_Ax3& thePenLoc = gp_Ax3(),
44 const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT,
45 const Graphic3d_VerticalTextAlignment theVAlign = Graphic3d_VTA_BOTTOM);
48 BRep_Builder myBuilder;
51 #endif // Font_BRepTextBuilder_Header