Hide menu
Loading...
Searching...
No Matches
cadex::PMI::TextComponent Class Reference

Defines a component represented by text. More...

#include <cadex/PMI/GraphicalComponent.hxx>

Inheritance diagram for cadex::PMI::TextComponent:
cadex::PMI::GraphicalComponent cadex::BaseObject

Public Member Functions

 TextComponent ()
 Constructor.
 
 TextComponent (const UTF16String &theText)
 Constructor.
 
void SetText (const UTF16String &theText)
 Sets the text component.
 
UTF16String Text () const
 Returns the text component.
 
void SetTextOrigin (const Geom::Point2d &theTextOrigin)
 Sets the text origin;.
 
Geom::Point2d TextOrigin () const
 Returns the position of the text on the 2d plane.
 
void SetTextDirection (const Geom::Direction2d &theTextDirection)
 Sets the text direction;.
 
Geom::Direction2d TextDirection () const
 Returns the direction of the text on the 2d plane.
 
void SetFontSize (float theFontSize)
 Sets the front size.
 
float FontSize () const
 Returns the size of the font.
 
void SetOutline (const Outline &theOutline)
 Sets the outline.
 
PMI::Outline Outline () const
 Returns the outline.
 
- Public Member Functions inherited from cadex::PMI::GraphicalComponent
void Accept (GraphicalComponentVisitor &theVisitor) const
 
- Public Member Functions inherited from cadex::BaseObject
size_t Id () const
 Return unique identifier of public object.
 
internal::BaseObjectImpl * Impl () const
 
bool IsNull () const
 
 operator bool () const
 
template<typename T >
bool IsOfType () const
 
template<typename T >
T * Impl () const
 Reserved for internal use.
 

Static Public Member Functions

static bool CompareType (const BaseObject &theObject)
 Returns true if theObject has the TextComponent type.
 
- Static Public Member Functions inherited from cadex::PMI::GraphicalComponent
static bool CompareType (const BaseObject &theObject)
 Returns true if theObject has GraphicalComponent type.
 

Additional Inherited Members

- Public Types inherited from cadex::BaseObject
typedef std::shared_ptr< internal::BaseObjectImpl > ImplType
 
- Protected Member Functions inherited from cadex::PMI::GraphicalComponent
 GraphicalComponent (const ImplType &theImpl)
 
- Protected Member Functions inherited from cadex::BaseObject
 BaseObject (const ImplType &theImpl)
 

Detailed Description

Defines a component represented by text.

The component stores PMI graphical data expressed by a string.

The component contains a text and outline. An outline is optional.

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

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

Member Function Documentation

◆ FontSize()

float cadex::PMI::TextComponent::FontSize ( ) const

Returns the size of the font.

Returns 16 by default or 0 if IsNull().

◆ TextDirection()

Geom::Direction2d cadex::PMI::TextComponent::TextDirection ( ) const

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

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