Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:00

0001 // Created on: 2015-08-10
0002 // Created by: Ilya SEVRIKOV
0003 // Copyright (c) 2013-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef StdPrs_BRepTextBuilder_Header
0017 #define StdPrs_BRepTextBuilder_Header
0018 
0019 #include <Font_BRepFont.hxx>
0020 #include <Font_TextFormatter.hxx>
0021 #include <gp_Ax3.hxx>
0022 
0023 //! Represents class for applying text formatting.
0024 class StdPrs_BRepTextBuilder
0025 {
0026 public:
0027   //! Render text as BRep shape.
0028   //! @param theFormatter formatter which defines aligned text
0029   //! @param thePenLoc start position and orientation on the baseline
0030   //! @return result shape with pen transformation applied as shape location
0031   Standard_EXPORT TopoDS_Shape Perform (StdPrs_BRepFont&                  theFont,
0032                                         const Handle(Font_TextFormatter)& theFormatter,
0033                                         const gp_Ax3&                     thePenLoc = gp_Ax3());
0034   //! Render text as BRep shape.
0035   //! @param theString text in UTF-8 encoding
0036   //! @param thePenLoc start position and orientation on the baseline
0037   //! @param theHAlign horizontal alignment of the text
0038   //! @param theVAlign vertical alignment of the text
0039   //! @return result shape with pen transformation applied as shape location
0040   Standard_EXPORT TopoDS_Shape Perform (StdPrs_BRepFont&                        theFont,
0041                                         const NCollection_String&               theString,
0042                                         const gp_Ax3&                           thePenLoc = gp_Ax3(),
0043                                         const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT,
0044                                         const Graphic3d_VerticalTextAlignment   theVAlign = Graphic3d_VTA_BOTTOM);
0045 
0046 protected:
0047   BRep_Builder myBuilder;
0048 };
0049 
0050 #endif // StdPrs_BRepTextBuilder_Header