0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / StdPrs / StdPrs_BRepTextBuilder.hxx
CommitLineData
7f24b768 1// Created on: 2015-08-10
2// Created by: Ilya SEVRIKOV
3// Copyright (c) 2013-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef StdPrs_BRepTextBuilder_Header
17#define StdPrs_BRepTextBuilder_Header
18
19#include <Font_BRepFont.hxx>
20#include <Font_TextFormatter.hxx>
21#include <gp_Ax3.hxx>
22
23//! Represents class for applying text formatting.
24class StdPrs_BRepTextBuilder
25{
26public:
27 //! Render text as BRep shape.
60f7b225 28 //! @param theFormatter formatter which defines aligned text
7f24b768 29 //! @param thePenLoc start position and orientation on the baseline
7f24b768 30 //! @return result shape with pen transformation applied as shape location
60f7b225 31 Standard_EXPORT TopoDS_Shape Perform (StdPrs_BRepFont& theFont,
32 const Handle(Font_TextFormatter)& theFormatter,
33 const gp_Ax3& thePenLoc = gp_Ax3());
7f24b768 34 //! Render text as BRep shape.
35 //! @param theString text in UTF-8 encoding
36 //! @param thePenLoc start position and orientation on the baseline
37 //! @param theHAlign horizontal alignment of the text
38 //! @param theVAlign vertical alignment of the text
39 //! @return result shape with pen transformation applied as shape location
40 Standard_EXPORT TopoDS_Shape Perform (StdPrs_BRepFont& theFont,
41 const NCollection_String& theString,
42 const gp_Ax3& thePenLoc = gp_Ax3(),
43 const Graphic3d_HorizontalTextAlignment theHAlign = Graphic3d_HTA_LEFT,
44 const Graphic3d_VerticalTextAlignment theVAlign = Graphic3d_VTA_BOTTOM);
45
46protected:
47 BRep_Builder myBuilder;
48};
49
50#endif // StdPrs_BRepTextBuilder_Header