Hide menu
Loading...
Searching...
No Matches
cadex::ModelData_PMITextComponent Class Reference

Defines a component represented by text. More...

#include <cadex/ModelData_PMIGraphicalElementComponent.hxx>

Inheritance diagram for cadex::ModelData_PMITextComponent:
cadex::ModelData_PMIGraphicalElementComponent cadex::Base_PublicObject

Public Types

typedef cadex::internal::ModelData_PMITextComponentImpl ImplType
 

Public Member Functions

 ModelData_PMITextComponent ()
 Constructor.
 
 ModelData_PMITextComponent (ImplType *theImpl)
 
void SetText (const Base_UTF16String &theText)
 
Base_UTF16String Text () const
 
void SetTextOrigin (const ModelData_Point2d &theTextOrigin)
 
ModelData_Point2d TextOrigin () const
 Returns a position of the text on the 2d plane.
 
void SetTextDirection (const ModelData_Direction2d &theTextDirection)
 
ModelData_Direction2d TextDirection () const
 Returns a direction of the text on the 2d plane.
 
void SetFontSize (float theFontSize)
 
float FontSize () const
 Returns size of the font.
 
void SetOutline (const ModelData_PMIOutline &theOutline)
 
ModelData_PMIOutline Outline () const
 
- Public Member Functions inherited from cadex::ModelData_PMIGraphicalElementComponent
void Accept (ModelData_PMIGraphicalElementComponentVisitor &theVisitor) const
 
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T.
 
- Public Member Functions inherited from cadex::Base_PublicObject
void Nullify ()
 Resets reference to implementation object.
 
bool IsNull () const
 Returns true if the object is nullified.
 
 operator bool () const
 Casts the object to the bool type.
 
internal::Base_HandledObject * Impl () const
 Return a handle to backend (reserved for internal use).
 

Static Public Member Functions

static bool CompareType (const ModelData_PMIGraphicalElementComponent &theComponent)
 Returns true if theOutline has ModelData_PMITextComponent type.
 

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_PMIGraphicalElementComponent
 ModelData_PMIGraphicalElementComponent ()
 Constructor.
 
 ModelData_PMIGraphicalElementComponent (internal::ModelData_PMIGraphicalElementComponentImpl *theImpl)
 Constructor.
 
- Protected Member Functions inherited from cadex::Base_PublicObject
 Base_PublicObject (const internal::Base_HandledObject *theObject)
 Constructor (reserved for internal use).
 
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.
 

Detailed Description

Defines a component represented by text.

A component stores PMI graphical data expressed by a string.

A component contains text and outline. Outline is optional and may be used as fallback, when target format doesn't support PMI text entities. It also may be used for fast screen rendering.

The elements of a component are defined by coordinates in the plane of its parent graphical element.

See also
ModelData_PMIGraphicalElement
Examples
exploring/pmi/Program.cs, and exploring/pmi/main.cxx.

Constructor & Destructor Documentation

◆ ModelData_PMITextComponent()

cadex::ModelData_PMITextComponent::ModelData_PMITextComponent ( )

Constructor.

Creates a null object (see IsNull()).

Member Function Documentation

◆ FontSize()

float cadex::ModelData_PMITextComponent::FontSize ( ) const

Returns size of the font.

Returns 16 by default or 0 if IsNull().

◆ TextDirection()

ModelData_Direction2d cadex::ModelData_PMITextComponent::TextDirection ( ) const

Returns a direction of the text on the 2d plane.

Default value is (1, 0), X Direction of the plane.