Open CASCADE Technology  7.7.0
Public Member Functions | Protected Attributes
Graphic3d_Text Class Reference

This class allows the definition of a text object for display. The text might be defined in one of ways, using: More...

#include <Graphic3d_Text.hxx>

Inheritance diagram for Graphic3d_Text:
Inheritance graph
[legend]

Public Member Functions

 Graphic3d_Text (const Standard_ShortReal theHeight)
 Creates default text parameters. More...
 
virtual ~Graphic3d_Text ()
 Destructor. More...
 
const NCollection_StringText () const
 Returns text value. More...
 
void SetText (const NCollection_String &theText)
 Sets text value. More...
 
void SetText (const TCollection_AsciiString &theText)
 Sets text value. More...
 
void SetText (Standard_CString theText)
 Sets text value. More...
 
const Handle< Font_TextFormatter > & TextFormatter () const
 
void SetTextFormatter (const Handle< Font_TextFormatter > &theFormatter)
 Setup text default formatter for text within this context. More...
 
const gp_PntPosition () const
 The 3D point of attachment is projected. If the orientation is defined, the text is written in the plane of projection. More...
 
void SetPosition (const gp_Pnt &thePoint)
 Sets text point. More...
 
const gp_Ax2Orientation () const
 Returns text orientation in 3D space. More...
 
Standard_Boolean HasPlane () const
 Returns true if the text is filled by a point. More...
 
void SetOrientation (const gp_Ax2 &theOrientation)
 Sets text orientation in 3D space. More...
 
void ResetOrientation ()
 Reset text orientation in 3D space. More...
 
Standard_Boolean HasOwnAnchorPoint () const
 Returns true if the text has an anchor point. More...
 
void SetOwnAnchorPoint (const Standard_Boolean theHasOwnAnchor)
 Returns true if the text has an anchor point. More...
 
Standard_ShortReal Height () const
 Sets height of text. (Relative to the Normalized Projection Coordinates (NPC) Space). More...
 
void SetHeight (const Standard_ShortReal theHeight)
 Returns height of text. More...
 
Graphic3d_HorizontalTextAlignment HorizontalAlignment () const
 Returns horizontal alignment of text. More...
 
void SetHorizontalAlignment (const Graphic3d_HorizontalTextAlignment theJustification)
 Sets horizontal alignment of text. More...
 
Graphic3d_VerticalTextAlignment VerticalAlignment () const
 Returns vertical alignment of text. More...
 
void SetVerticalAlignment (const Graphic3d_VerticalTextAlignment theJustification)
 Sets vertical alignment of text. 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 void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::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 opencascade::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...
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Protected Attributes

Handle< Font_TextFormattermyFormatter
 text formatter More...
 
NCollection_String myText
 text value More...
 
gp_Ax2 myOrientation
 Text orientation in 3D space. More...
 
Standard_ShortReal myHeight
 height of text More...
 
Graphic3d_HorizontalTextAlignment myHAlign
 horizontal alignment More...
 
Graphic3d_VerticalTextAlignment myVAlign
 vertical alignment More...
 
Standard_Boolean myHasPlane
 Check if text have orientation in 3D space. More...
 
Standard_Boolean myHasOwnAnchor
 flag if text uses position as point of attach More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

This class allows the definition of a text object for display. The text might be defined in one of ways, using:

This class also has parameters of the text height and H/V alignments. Custom formatting is available using Font_TextFormatter.

Constructor & Destructor Documentation

◆ Graphic3d_Text()

Graphic3d_Text::Graphic3d_Text ( const Standard_ShortReal  theHeight)

Creates default text parameters.

◆ ~Graphic3d_Text()

virtual Graphic3d_Text::~Graphic3d_Text ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ HasOwnAnchorPoint()

Standard_Boolean Graphic3d_Text::HasOwnAnchorPoint ( ) const
inline

Returns true if the text has an anchor point.

◆ HasPlane()

Standard_Boolean Graphic3d_Text::HasPlane ( ) const
inline

Returns true if the text is filled by a point.

◆ Height()

Standard_ShortReal Graphic3d_Text::Height ( ) const
inline

Sets height of text. (Relative to the Normalized Projection Coordinates (NPC) Space).

◆ HorizontalAlignment()

Graphic3d_HorizontalTextAlignment Graphic3d_Text::HorizontalAlignment ( ) const
inline

Returns horizontal alignment of text.

◆ Orientation()

const gp_Ax2& Graphic3d_Text::Orientation ( ) const
inline

Returns text orientation in 3D space.

◆ Position()

const gp_Pnt& Graphic3d_Text::Position ( ) const
inline

The 3D point of attachment is projected. If the orientation is defined, the text is written in the plane of projection.

◆ ResetOrientation()

void Graphic3d_Text::ResetOrientation ( )

Reset text orientation in 3D space.

◆ SetHeight()

void Graphic3d_Text::SetHeight ( const Standard_ShortReal  theHeight)
inline

Returns height of text.

◆ SetHorizontalAlignment()

void Graphic3d_Text::SetHorizontalAlignment ( const Graphic3d_HorizontalTextAlignment  theJustification)
inline

Sets horizontal alignment of text.

◆ SetOrientation()

void Graphic3d_Text::SetOrientation ( const gp_Ax2 theOrientation)

Sets text orientation in 3D space.

◆ SetOwnAnchorPoint()

void Graphic3d_Text::SetOwnAnchorPoint ( const Standard_Boolean  theHasOwnAnchor)
inline

Returns true if the text has an anchor point.

◆ SetPosition()

void Graphic3d_Text::SetPosition ( const gp_Pnt thePoint)
inline

Sets text point.

◆ SetText() [1/3]

void Graphic3d_Text::SetText ( const NCollection_String theText)
inline

Sets text value.

◆ SetText() [2/3]

void Graphic3d_Text::SetText ( const TCollection_AsciiString theText)
inline

Sets text value.

◆ SetText() [3/3]

void Graphic3d_Text::SetText ( Standard_CString  theText)
inline

Sets text value.

◆ SetTextFormatter()

void Graphic3d_Text::SetTextFormatter ( const Handle< Font_TextFormatter > &  theFormatter)
inline

Setup text default formatter for text within this context.

◆ SetVerticalAlignment()

void Graphic3d_Text::SetVerticalAlignment ( const Graphic3d_VerticalTextAlignment  theJustification)
inline

Sets vertical alignment of text.

◆ Text()

const NCollection_String& Graphic3d_Text::Text ( ) const
inline

Returns text value.

◆ TextFormatter()

const Handle< Font_TextFormatter >& Graphic3d_Text::TextFormatter ( ) const
inline
Returns
text formatter; NULL by default, which means standard text formatter will be used.

◆ VerticalAlignment()

Graphic3d_VerticalTextAlignment Graphic3d_Text::VerticalAlignment ( ) const
inline

Returns vertical alignment of text.

Field Documentation

◆ myFormatter

Handle< Font_TextFormatter > Graphic3d_Text::myFormatter
protected

text formatter

◆ myHAlign

Graphic3d_HorizontalTextAlignment Graphic3d_Text::myHAlign
protected

horizontal alignment

◆ myHasOwnAnchor

Standard_Boolean Graphic3d_Text::myHasOwnAnchor
protected

flag if text uses position as point of attach

◆ myHasPlane

Standard_Boolean Graphic3d_Text::myHasPlane
protected

Check if text have orientation in 3D space.

◆ myHeight

Standard_ShortReal Graphic3d_Text::myHeight
protected

height of text

◆ myOrientation

gp_Ax2 Graphic3d_Text::myOrientation
protected

Text orientation in 3D space.

◆ myText

NCollection_String Graphic3d_Text::myText
protected

text value

◆ myVAlign

Graphic3d_VerticalTextAlignment Graphic3d_Text::myVAlign
protected

vertical alignment


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