mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +03:00
0031459: Visualization, AIS_TextLabel - add missing getters
Add getters for Text, FontName and FontAspect Remove duplicate properties: Font and FontAspect
This commit is contained in:
parent
486ad71287
commit
64943a5187
@ -38,8 +38,6 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_TextLabel,AIS_InteractiveObject)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
AIS_TextLabel::AIS_TextLabel()
|
AIS_TextLabel::AIS_TextLabel()
|
||||||
: myText ("?"),
|
: myText ("?"),
|
||||||
myFont ("Courier"),
|
|
||||||
myFontAspect (Font_FA_Regular),
|
|
||||||
myHasOrientation3D (Standard_False),
|
myHasOrientation3D (Standard_False),
|
||||||
myHasFlipping (Standard_False)
|
myHasFlipping (Standard_False)
|
||||||
{
|
{
|
||||||
@ -155,8 +153,7 @@ void AIS_TextLabel::SetFontAspect (const Font_FontAspect theFontAspect)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void AIS_TextLabel::SetFont (Standard_CString theFont)
|
void AIS_TextLabel::SetFont (Standard_CString theFont)
|
||||||
{
|
{
|
||||||
myFont = theFont;
|
myDrawer->TextAspect()->SetFont (theFont);
|
||||||
myDrawer->TextAspect()->SetFont (myFont.ToCString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -187,6 +184,24 @@ const gp_Pnt& AIS_TextLabel::Position() const
|
|||||||
return myOrientation3D.Location();
|
return myOrientation3D.Location();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : FontName
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
const TCollection_AsciiString& AIS_TextLabel::FontName() const
|
||||||
|
{
|
||||||
|
return myDrawer->TextAspect()->Aspect()->Font();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : FontAspect
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
Font_FontAspect AIS_TextLabel::FontAspect() const
|
||||||
|
{
|
||||||
|
return myDrawer->TextAspect()->Aspect()->GetTextFontAspect();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Orientation3D
|
//function : Orientation3D
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -83,6 +83,15 @@ public:
|
|||||||
//! Returns position.
|
//! Returns position.
|
||||||
Standard_EXPORT const gp_Pnt& Position() const;
|
Standard_EXPORT const gp_Pnt& Position() const;
|
||||||
|
|
||||||
|
//! Returns the label text.
|
||||||
|
const TCollection_ExtendedString& Text() const { return myText; }
|
||||||
|
|
||||||
|
//! Returns the font of the label text.
|
||||||
|
Standard_EXPORT const TCollection_AsciiString& FontName() const;
|
||||||
|
|
||||||
|
//! Returns the font aspect of the label text.
|
||||||
|
Standard_EXPORT Font_FontAspect FontAspect() const;
|
||||||
|
|
||||||
//! Returns label orientation in the model 3D space.
|
//! Returns label orientation in the model 3D space.
|
||||||
Standard_EXPORT const gp_Ax2& Orientation3D() const;
|
Standard_EXPORT const gp_Ax2& Orientation3D() const;
|
||||||
|
|
||||||
@ -120,8 +129,6 @@ private:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
TCollection_ExtendedString myText;
|
TCollection_ExtendedString myText;
|
||||||
TCollection_AsciiString myFont;
|
|
||||||
Font_FontAspect myFontAspect;
|
|
||||||
gp_Ax2 myOrientation3D;
|
gp_Ax2 myOrientation3D;
|
||||||
Standard_Boolean myHasOrientation3D;
|
Standard_Boolean myHasOrientation3D;
|
||||||
Standard_Boolean myHasFlipping;
|
Standard_Boolean myHasFlipping;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user