File indexing completed on 2026-07-14 08:40:27
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _Graphic3d_AspectText3d_HeaderFile
0017 #define _Graphic3d_AspectText3d_HeaderFile
0018
0019 #include <Graphic3d_Aspects.hxx>
0020
0021
0022 class Graphic3d_AspectText3d : public Graphic3d_Aspects
0023 {
0024 DEFINE_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Graphic3d_Aspects)
0025 public:
0026
0027
0028
0029
0030
0031 Standard_EXPORT Graphic3d_AspectText3d();
0032
0033
0034
0035
0036
0037
0038
0039
0040 Standard_EXPORT Graphic3d_AspectText3d(
0041 const Quantity_Color& theColor,
0042 Standard_CString theFont,
0043 Standard_Real theExpansionFactor,
0044 Standard_Real theSpace,
0045 Aspect_TypeOfStyleText theStyle = Aspect_TOST_NORMAL,
0046 Aspect_TypeOfDisplayText theDisplayType = Aspect_TODT_NORMAL);
0047
0048
0049 const Quantity_Color& Color() const { return myInteriorColor.GetRGB(); }
0050
0051
0052 const Quantity_ColorRGBA& ColorRGBA() const { return myInteriorColor; }
0053
0054
0055 void SetColor(const Quantity_Color& theColor) { myInteriorColor.SetRGB(theColor); }
0056
0057
0058 void SetColor(const Quantity_ColorRGBA& theColor) { myInteriorColor = theColor; }
0059
0060
0061 const TCollection_AsciiString& Font() const
0062 {
0063 if (myTextFont.IsNull())
0064 {
0065 static const TCollection_AsciiString anEmpty;
0066 return anEmpty;
0067 }
0068 return myTextFont->String();
0069 }
0070
0071
0072 void SetFont(const TCollection_AsciiString& theFont)
0073 {
0074 if (!theFont.IsEmpty())
0075 {
0076 myTextFont = new TCollection_HAsciiString(theFont);
0077 }
0078 else
0079 {
0080 myTextFont.Nullify();
0081 }
0082 }
0083
0084
0085 void SetFont(const Standard_CString theFont) { SetFont(TCollection_AsciiString(theFont)); }
0086
0087
0088 Aspect_TypeOfStyleText Style() const { return myTextStyle; }
0089
0090
0091 void SetStyle(Aspect_TypeOfStyleText theStyle) { myTextStyle = theStyle; }
0092
0093
0094 Aspect_TypeOfDisplayText DisplayType() const { return myTextDisplayType; }
0095
0096
0097 void SetDisplayType(Aspect_TypeOfDisplayText theDisplayType)
0098 {
0099 myTextDisplayType = theDisplayType;
0100 }
0101
0102
0103 bool GetTextZoomable() const { return myIsTextZoomable; }
0104
0105
0106 Standard_ShortReal GetTextAngle() const { return myTextAngle; }
0107
0108
0109 void SetTextAngle(const Standard_Real theAngle) { myTextAngle = (Standard_ShortReal)theAngle; }
0110
0111
0112 Font_FontAspect GetTextFontAspect() const { return myTextFontAspect; }
0113
0114
0115 Standard_EXPORT virtual void DumpJson(Standard_OStream& theOStream,
0116 Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0117 };
0118
0119 DEFINE_STANDARD_HANDLE(Graphic3d_AspectText3d, Graphic3d_Aspects)
0120
0121 #endif