File indexing completed on 2026-09-23 09:18:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Prs3d_TextAspect_HeaderFile
0018 #define _Prs3d_TextAspect_HeaderFile
0019
0020 #include <Graphic3d_AspectText3d.hxx>
0021 #include <Graphic3d_TextPath.hxx>
0022 #include <Graphic3d_HorizontalTextAlignment.hxx>
0023 #include <Graphic3d_VerticalTextAlignment.hxx>
0024 #include <Prs3d_BasicAspect.hxx>
0025
0026
0027 class Prs3d_TextAspect : public Prs3d_BasicAspect
0028 {
0029 DEFINE_STANDARD_RTTIEXT(Prs3d_TextAspect, Prs3d_BasicAspect)
0030 public:
0031
0032 Standard_EXPORT Prs3d_TextAspect();
0033
0034 Standard_EXPORT Prs3d_TextAspect(const occ::handle<Graphic3d_AspectText3d>& theAspect);
0035
0036
0037 void SetColor(const Quantity_Color& theColor) { myTextAspect->SetColor(theColor); }
0038
0039
0040 void SetFont(const char* const theFont) { myTextAspect->SetFont(theFont); }
0041
0042
0043 void SetHeight(const double theHeight) { myHeight = theHeight; }
0044
0045
0046 void SetAngle(const double theAngle) { myTextAspect->SetTextAngle(theAngle); }
0047
0048
0049 double Height() const { return myHeight; }
0050
0051
0052 double Angle() const { return myTextAspect->GetTextAngle(); }
0053
0054
0055 void SetHorizontalJustification(const Graphic3d_HorizontalTextAlignment theJustification)
0056 {
0057 myHorizontalJustification = theJustification;
0058 }
0059
0060
0061 void SetVerticalJustification(const Graphic3d_VerticalTextAlignment theJustification)
0062 {
0063 myVerticalJustification = theJustification;
0064 }
0065
0066
0067 void SetOrientation(const Graphic3d_TextPath theOrientation) { myOrientation = theOrientation; }
0068
0069
0070
0071
0072
0073
0074
0075 Graphic3d_HorizontalTextAlignment HorizontalJustification() const
0076 {
0077 return myHorizontalJustification;
0078 }
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088 Graphic3d_VerticalTextAlignment VerticalJustification() const { return myVerticalJustification; }
0089
0090
0091
0092
0093
0094
0095
0096 Graphic3d_TextPath Orientation() const { return myOrientation; }
0097
0098
0099
0100
0101
0102
0103
0104 const occ::handle<Graphic3d_AspectText3d>& Aspect() const { return myTextAspect; }
0105
0106 void SetAspect(const occ::handle<Graphic3d_AspectText3d>& theAspect) { myTextAspect = theAspect; }
0107
0108
0109 Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0110
0111 protected:
0112 occ::handle<Graphic3d_AspectText3d> myTextAspect;
0113 double myHeight;
0114 Graphic3d_HorizontalTextAlignment myHorizontalJustification;
0115 Graphic3d_VerticalTextAlignment myVerticalJustification;
0116 Graphic3d_TextPath myOrientation;
0117 };
0118
0119 #endif