CFx SDK Documentation
2020SP3
|
#include <DbText.h>
<group OdDb_Classes>
This class represents single-line text entities in an OdDbDatabase instance.
Corresponding C++ library: TD_Db
OdDbText::OdDbText | ( | ) |
|
virtual |
Adjusts the position of this Text entity if its alignent is not left baseline.
pDb | [in] Pointer to database used to resolve the text style of this Text entity. |
If this Text entity is database resident, pDb is ignored.
If this Text entity is not database resident, pDb cannot be NULL.
OdGePoint3d OdDbText::alignmentPoint | ( | ) | const |
Returns the alignment point of this Text entity (WCS equivalent of DXF 11).
void OdDbText::convertFieldToText | ( | ) |
Converts the fields in this Text entity to text, and removes the fields.
int OdDbText::correctSpelling | ( | ) |
Evokes the spell checker on this Text entity.
|
virtual |
Reads the .dwg file data of this object.
pFiler | [in] Filer object from which data are read. |
This function is called by dwgIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Writes the .dwg file data of this object.
pFiler | [in] Pointer to the filer to which data are written. |
This function is called by dwgIn() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Reads the DXF data of this object.
pFiler | [in] Pointer to the filer from which data are read. |
This function is called by dxfIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Reads the DXF R12 format data of this object.
pFiler | [in] Pointer to the filer from which data are to be read. |
This function is called by dxfIn() to allow the object to read its data.
When overriding this function:
1) Call assertWriteEnabled(). 2) Call the parent class's dxfInFields_R12(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfOutFields_R12(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Writes the DXF data of this object.
pFiler | [in] Pointer to the filer to which data are to be written. |
This function is called by dxfOut() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Writes the DXF data of this object.
pFiler | [in] Pointer to the filer to which data are to be written. |
This function is called by dxfOut() to allow the object to write its data.
When overriding this function:
1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 3) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
void OdDbText::getBoundingPoints | ( | OdGePoint3dArray & | boundingPoints | ) | const |
Returns the WCS bounding points of this Text entity.
boundingPoints | [out] Receives the bounding points. |
Corner boundingPoints[0] Top left boundingPoints[1] Top right boundingPoints[2] Bottom right boundingPoints[3] Bottom left
|
virtual |
Returns the plane that contains this entity.
plane | [out] Receives the plane that contains this entity. |
planarity | [out] Receives the planarity of this entity. |
planarity and plane return values as follows::
Value Description plane kNonPlanar 0 Non-planar Not set kPlanar 1 Planar Entity plane kLinear 2 Linear Arrbitrary plane containing this entity
Reimplemented from OdDbEntity.
double OdDbText::height | ( | ) | const |
Returns the height of this Text entity (DXF 40).
OdDb::TextHorzMode OdDbText::horizontalMode | ( | ) | const |
Returns the horizontal mode of this Text entity (DXF 72).
Value OdDb::kTextLeft 0 OdDb::kTextCenter 1 OdDb::kTextRight 2 OdDb::kTextAlign 3 OdDb::kTextMid 4
OdDb::kTextFit 5
bool OdDbText::isDefaultAlignment | ( | ) | const |
Return true if and only if this Text entity is in the default alignment.
bool OdDbText::isMirroredInX | ( | ) | const |
Returns true if and only if this Text entity is mirrored in the X (horizontal) direction (DXF 71, bit 0x02).
bool OdDbText::isMirroredInY | ( | ) | const |
Returns true if and only if this Text entity is mirrored in the Y (vertical) direction (DXF 71, bit 0x04).
|
inlinevirtual |
void OdDbText::mirrorInX | ( | bool | mirror | ) |
Controls the mirroring of this Text entity in the X (horizontal) direction (DXF 71, bit 0x02).
mirror | [in] Controls mirroring. |
void OdDbText::mirrorInY | ( | bool | mirror | ) |
Controls the mirroring of this Text entity in the Y (vertical) direction (DXF 71, bit 0x04).
mirror | [in] Controls mirroring. |
OdGeVector3d OdDbText::normal | ( | ) | const |
Returns the WCS normal to the plane of this entity (DXF 210).
double OdDbText::oblique | ( | ) | const |
Returns the oblique angle of this Text entity (DXF 51).
Oblique angles are measured clockwise from the vertical.
OdDbText::ODDB_DECLARE_MEMBERS | ( | OdDbText | ) |
OdGePoint3d OdDbText::position | ( | ) | const |
Returns the position of this entity (WCS equivalent of DXF 10).
|
virtual |
Removes the specified field from the field dictionary of this object.
fieldName | [in] Name (key) for the entry. |
Reimplemented from OdDbObject.
|
virtual |
Removes the specified field from the field dictionary of this object.
fieldId | [in] Object ID for the field. |
Reimplemented from OdDbObject.
double OdDbText::rotation | ( | ) | const |
Returns the rotation angle of this Text entity (DXF 50).
void OdDbText::setAlignmentPoint | ( | const OdGePoint3d & | alignment | ) |
Sets the alignment point of this Text entity (WCS equivalent of DXF 11).
alignment | [in] Alignment point. |
|
virtual |
Adds the specified field to the field dictionary of this object.
fieldName | [in] Name (key) for the new entry. |
pField | [in] Pointer to the field object. |
Reimplemented from OdDbObject.
void OdDbText::setHeight | ( | double | height | ) |
Sets the height of this Text entity (DXF 40).
height | [in] Text height. |
void OdDbText::setHorizontalMode | ( | OdDb::TextHorzMode | horizontalMode | ) |
Returns the horizontal mode of this Text entity (DXF 72).
horizontalMode | [in] Horizontal mode. |
Value OdDb::kTextLeft 0 OdDb::kTextCenter 1 OdDb::kTextRight 2 OdDb::kTextAlign 3 OdDb::kTextMid 4
OdDb::kTextFit 5
void OdDbText::setNormal | ( | const OdGeVector3d & | normal | ) |
Sets the WCS normal to the plane of this entity (DXF 210).
normal | [in] Normal. |
void OdDbText::setOblique | ( | double | oblique | ) |
Sets the oblique angle of this Text entity (DXF 51).
oblique | [in] Oblique angle. |
Oblique angles are measured clockwise from the vertical.
void OdDbText::setPosition | ( | const OdGePoint3d & | position | ) |
Sets the position of this entity (WCS equivalent of DXF 10).
position | [in] Position. |
void OdDbText::setRotation | ( | double | rotation | ) |
Sets the rotation angle of this Text entity (DXF 50).
rotation | [in] Rotation angle. |
Sets the text string of this Text entity (DXF 1).
textString | [in] Text string. |
void OdDbText::setTextStyle | ( | OdDbObjectId | textStyleId | ) |
Sets the Object ID of the text style of this Text entity (DXF 7).
textStyleId | [in] Text style Object ID. |
void OdDbText::setThickness | ( | double | thickness | ) |
Sets the thickness of this entity (DXF 39).
thickness | [in] Thickness. |
void OdDbText::setVerticalMode | ( | OdDb::TextVertMode | verticalMode | ) |
Sets the vertical mode of this Text entity (DXF 73).
verticalMode | [in] Vertical mode. |
Value OdDb::kTextBase 0 OdDb::kTextBottom 1 OdDb::kTextVertMid 2 OdDb::kTextTop 3
void OdDbText::setWidthFactor | ( | double | widthFactor | ) |
Sets the width factor of this Text entity (DXF 40).
widthFactor | [in] Width factor. |
|
virtual |
Called as the first operation as this object is being closed, for database -resident objects only.
When overriding this function:
1) If the OdDbObject's state is incorrect, throw exception.
2) Call parent class's subClose().
3) If other actions are required before close, do them.
The default implementation of this function does nothing. This function can be overridden in custom classes.
Reimplemented from OdDbObject.
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Reimplemented from OdDbEntity.
|
virtual |
This function is an override for OdDbEntity::subSetDatabaseDefaults() to set the text style of this entity to the current style and text size for the specified database.
Reimplemented from OdDbEntity.
|
virtual |
Reimplemented from OdDbEntity.
|
virtual |
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
|
virtual |
Reimplemented from OdDbEntity.
Reimplemented in OdDbAttributeDefinition, and OdDbAttribute.
OdString OdDbText::textString | ( | ) | const |
Returns the text string of this Text entity (DXF 1).
OdDbObjectId OdDbText::textStyle | ( | ) | const |
Returns the Object ID of the text style of this Text entity (DXF 7).
double OdDbText::thickness | ( | ) | const |
Returns the thickness of this entity (DXF 39).
OdDb::TextVertMode OdDbText::verticalMode | ( | ) | const |
Returns the vertical mode of this Text entity (DXF 73).
Value OdDb::kTextBase 0 OdDb::kTextBottom 1 OdDb::kTextVertMid 2 OdDb::kTextTop 3
double OdDbText::widthFactor | ( | ) | const |
Returns the width factor of this Text entity (DXF 41).