File indexing completed on 2025-01-18 10:04:40
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
0033 Standard_EXPORT Prs3d_TextAspect();
0034
0035 Standard_EXPORT Prs3d_TextAspect(const Handle(Graphic3d_AspectText3d)& theAspect);
0036
0037
0038 void SetColor (const Quantity_Color& theColor) { myTextAspect->SetColor (theColor); }
0039
0040
0041 void SetFont (const Standard_CString theFont) { myTextAspect->SetFont (theFont); }
0042
0043
0044 void SetHeight (const Standard_Real theHeight) { myHeight = theHeight; }
0045
0046
0047 void SetAngle (const Standard_Real theAngle) { myTextAspect->SetTextAngle (theAngle); }
0048
0049
0050 Standard_Real Height() const { return myHeight; }
0051
0052
0053 Standard_Real Angle() const { return myTextAspect->GetTextAngle(); }
0054
0055
0056 void SetHorizontalJustification (const Graphic3d_HorizontalTextAlignment theJustification) { myHorizontalJustification = theJustification; }
0057
0058
0059 void SetVerticalJustification (const Graphic3d_VerticalTextAlignment theJustification) { myVerticalJustification = theJustification; }
0060
0061
0062 void SetOrientation (const Graphic3d_TextPath theOrientation) { myOrientation = theOrientation; }
0063
0064
0065
0066
0067
0068
0069
0070 Graphic3d_HorizontalTextAlignment HorizontalJustification() const { return myHorizontalJustification; }
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 Graphic3d_VerticalTextAlignment VerticalJustification() const { return myVerticalJustification; }
0081
0082
0083
0084
0085
0086
0087
0088 Graphic3d_TextPath Orientation() const { return myOrientation; }
0089
0090
0091
0092
0093
0094
0095
0096 const Handle(Graphic3d_AspectText3d)& Aspect() const { return myTextAspect; }
0097
0098 void SetAspect (const Handle(Graphic3d_AspectText3d)& theAspect) { myTextAspect = theAspect; }
0099
0100
0101 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0102
0103 protected:
0104
0105 Handle(Graphic3d_AspectText3d) myTextAspect;
0106 Standard_Real myHeight;
0107 Graphic3d_HorizontalTextAlignment myHorizontalJustification;
0108 Graphic3d_VerticalTextAlignment myVerticalJustification;
0109 Graphic3d_TextPath myOrientation;
0110
0111 };
0112
0113 DEFINE_STANDARD_HANDLE(Prs3d_TextAspect, Prs3d_BasicAspect)
0114
0115 #endif