Defines a component represented by text. More...
#include <cadex/PMI/GraphicalComponent.hxx>
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. | |
![]() | |
void | Accept (GraphicalComponentVisitor &theVisitor) const |
![]() | |
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 bool | CompareType (const BaseObject &theObject) |
Returns true if theObject has GraphicalComponent type. | |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< internal::BaseObjectImpl > | ImplType |
![]() | |
GraphicalComponent (const ImplType &theImpl) | |
![]() | |
BaseObject (const ImplType &theImpl) | |
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.
float cadex::PMI::TextComponent::FontSize | ( | ) | const |
Returns the size of the font.
Returns 16 by default or 0 if IsNull().
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.