Open CASCADE Technology  6.9.0
Public Member Functions

Graphic3d_AspectText3d Class Reference

Creates and updates a group of attributes for text primitives. This group contains the colour, font, expansion factor (height/width ratio), and inter-character space. More...

#include <Graphic3d_AspectText3d.hxx>

Inheritance diagram for Graphic3d_AspectText3d:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_AspectText3d ()
 Creates a context table for text primitives defined with the following default values: More...
 
 Graphic3d_AspectText3d (const Quantity_Color &AColor, const Standard_CString AFont, const Standard_Real AExpansionFactor, const Standard_Real ASpace, const Aspect_TypeOfStyleText AStyle=Aspect_TOST_NORMAL, const Aspect_TypeOfDisplayText ADisplayType=Aspect_TODT_NORMAL)
 Creates a context table for text primitives defined with the specified values. AFont may be to take means from User(example "Courier New") or Font name defined in Font_NameOfFont(example Font_NOF_ASCII_MONO) or use default font("Courier") More...
 
void SetColor (const Quantity_Color &AColor)
 Modifies the colour of <me>. More...
 
void SetExpansionFactor (const Standard_Real AFactor)
 Modifies the expansion factor (height/width ratio) If the factor is less than 1, the characters will be higher than they are wide. More...
 
void SetFont (const Standard_CString AFont)
 Modifies the font of <me>. More...
 
void SetSpace (const Standard_Real ASpace)
 Modifies the space between the characters. More...
 
void SetStyle (const Aspect_TypeOfStyleText AStyle)
 Modifies the style of the text. TOST_NORMAL Default text. The text is displayed like any other graphic object. This text can be hidden by another object that is nearest from the point of view. TOST_ANNOTATION The text is always visible. The texte is displayed over the other object according to the priority. More...
 
void SetDisplayType (const Aspect_TypeOfDisplayText ADisplayType)
 Define the display type of the text. More...
 
void SetColorSubTitle (const Quantity_Color &AColor)
 Modifies the colour of the subtitle for the TODT_SUBTITLE TextDisplayType and the colour of backgroubd for the TODT_DEKALE TextDisplayType. More...
 
void SetTextZoomable (const Standard_Boolean AFlag)
 Turns usage of text zoomable on/off. More...
 
Standard_Boolean GetTextZoomable () const
 Returns TRUE when the Text Zoomable is on. More...
 
void SetTextAngle (const Standard_Real AAngle)
 Turns usage of text rotated. More...
 
Standard_Real GetTextAngle () const
 Returns Angle of degree. More...
 
void SetTextFontAspect (const Font_FontAspect AFontAspect)
 Turns usage of Aspect text. More...
 
Font_FontAspect GetTextFontAspect () const
 Returns text FontAspect. More...
 
void SetShaderProgram (const Handle< Graphic3d_ShaderProgram > &theProgram)
 Sets up OpenGL/GLSL shader program. More...
 
void Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace) const
 Returns the current values of the group <me>. More...
 
void Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle) const
 Returns the current values of the group <me>. More...
 
void Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle, Standard_Boolean &ATextZoomable, Standard_Real &ATextAngle) const
 Returns the current values of the group <me>. More...
 
void Values (Quantity_Color &AColor, Standard_CString &AFont, Standard_Real &AnExpansionFactor, Standard_Real &ASpace, Aspect_TypeOfStyleText &AStyle, Aspect_TypeOfDisplayText &ADisplayType, Quantity_Color &AColorSubTitle, Standard_Boolean &ATextZoomable, Standard_Real &ATextAngle, Font_FontAspect &ATextFontAspect) const
 Returns the current values of the group <me>. More...
 
const Handle
< Graphic3d_ShaderProgram > & 
ShaderProgram () const
 
- Public Member Functions inherited from MMgt_TShared
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual const
Handle_Standard_Type & 
DynamicType () const
 Returns a type information object about this object. More...
 
Standard_Boolean IsInstance (const Handle_Standard_Type &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean IsKind (const Handle_Standard_Type &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More...
 
virtual Handle_Standard_Transient This () const
 Returns a Handle which references this object. Must never be called to objects created in stack. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 

Detailed Description

Creates and updates a group of attributes for text primitives. This group contains the colour, font, expansion factor (height/width ratio), and inter-character space.

NOTE: The font name is stored in the aspect instance so it is safe to pass it as const char* to OpenGl package without copying the string. However, the aspect should not be deleted until the text drawn using this aspect is no longer visible. The best practice is to keep the aspect in the object's drawer.

Constructor & Destructor Documentation

Graphic3d_AspectText3d::Graphic3d_AspectText3d ( )

Creates a context table for text primitives defined with the following default values:

Colour : NOC_YELLOW Font : NOF_ASCII_MONO Expansion factor : 1. Space between characters : 0. The style : TOST_NORMAL The display type : TODT_NORMAL

Graphic3d_AspectText3d::Graphic3d_AspectText3d ( const Quantity_Color AColor,
const Standard_CString  AFont,
const Standard_Real  AExpansionFactor,
const Standard_Real  ASpace,
const Aspect_TypeOfStyleText  AStyle = Aspect_TOST_NORMAL,
const Aspect_TypeOfDisplayText  ADisplayType = Aspect_TODT_NORMAL 
)

Creates a context table for text primitives defined with the specified values. AFont may be to take means from User(example "Courier New") or Font name defined in Font_NameOfFont(example Font_NOF_ASCII_MONO) or use default font("Courier")

Member Function Documentation

Standard_Real Graphic3d_AspectText3d::GetTextAngle ( ) const

Returns Angle of degree.

Font_FontAspect Graphic3d_AspectText3d::GetTextFontAspect ( ) const

Returns text FontAspect.

Standard_Boolean Graphic3d_AspectText3d::GetTextZoomable ( ) const

Returns TRUE when the Text Zoomable is on.

void Graphic3d_AspectText3d::SetColor ( const Quantity_Color AColor)

Modifies the colour of <me>.

void Graphic3d_AspectText3d::SetColorSubTitle ( const Quantity_Color AColor)

Modifies the colour of the subtitle for the TODT_SUBTITLE TextDisplayType and the colour of backgroubd for the TODT_DEKALE TextDisplayType.

void Graphic3d_AspectText3d::SetDisplayType ( const Aspect_TypeOfDisplayText  ADisplayType)

Define the display type of the text.

TODT_NORMAL Default display. Text only. TODT_SUBTITLE There is a subtitle under the text. TODT_DEKALE The text is displayed with a 3D style. TODT_BLEND The text is displayed in XOR. TODT_DIMENSION Dimension line under text will be invisible.

void Graphic3d_AspectText3d::SetExpansionFactor ( const Standard_Real  AFactor)

Modifies the expansion factor (height/width ratio) If the factor is less than 1, the characters will be higher than they are wide.

void Graphic3d_AspectText3d::SetFont ( const Standard_CString  AFont)

Modifies the font of <me>.

void Graphic3d_AspectText3d::SetShaderProgram ( const Handle< Graphic3d_ShaderProgram > &  theProgram)

Sets up OpenGL/GLSL shader program.

void Graphic3d_AspectText3d::SetSpace ( const Standard_Real  ASpace)

Modifies the space between the characters.

void Graphic3d_AspectText3d::SetStyle ( const Aspect_TypeOfStyleText  AStyle)

Modifies the style of the text. TOST_NORMAL Default text. The text is displayed like any other graphic object. This text can be hidden by another object that is nearest from the point of view. TOST_ANNOTATION The text is always visible. The texte is displayed over the other object according to the priority.

void Graphic3d_AspectText3d::SetTextAngle ( const Standard_Real  AAngle)

Turns usage of text rotated.

void Graphic3d_AspectText3d::SetTextFontAspect ( const Font_FontAspect  AFontAspect)

Turns usage of Aspect text.

void Graphic3d_AspectText3d::SetTextZoomable ( const Standard_Boolean  AFlag)

Turns usage of text zoomable on/off.

const Handle< Graphic3d_ShaderProgram >& Graphic3d_AspectText3d::ShaderProgram ( ) const
void Graphic3d_AspectText3d::Values ( Quantity_Color AColor,
Standard_CString AFont,
Standard_Real AnExpansionFactor,
Standard_Real ASpace 
) const

Returns the current values of the group <me>.

void Graphic3d_AspectText3d::Values ( Quantity_Color AColor,
Standard_CString AFont,
Standard_Real AnExpansionFactor,
Standard_Real ASpace,
Aspect_TypeOfStyleText AStyle,
Aspect_TypeOfDisplayText ADisplayType,
Quantity_Color AColorSubTitle 
) const

Returns the current values of the group <me>.

void Graphic3d_AspectText3d::Values ( Quantity_Color AColor,
Standard_CString AFont,
Standard_Real AnExpansionFactor,
Standard_Real ASpace,
Aspect_TypeOfStyleText AStyle,
Aspect_TypeOfDisplayText ADisplayType,
Quantity_Color AColorSubTitle,
Standard_Boolean ATextZoomable,
Standard_Real ATextAngle 
) const

Returns the current values of the group <me>.

void Graphic3d_AspectText3d::Values ( Quantity_Color AColor,
Standard_CString AFont,
Standard_Real AnExpansionFactor,
Standard_Real ASpace,
Aspect_TypeOfStyleText AStyle,
Aspect_TypeOfDisplayText ADisplayType,
Quantity_Color AColorSubTitle,
Standard_Boolean ATextZoomable,
Standard_Real ATextAngle,
Font_FontAspect ATextFontAspect 
) const

Returns the current values of the group <me>.


The documentation for this class was generated from the following file: