LayOut C API
|
#include <LayOutAPI/common.h>
#include <LayOutAPI/geometry/geometry.h>
#include <LayOutAPI/model/defs.h>
Go to the source code of this file.
Enumerations | |
enum | LOLinearDimensionLeaderLineType { LOLinearDimensionLeaderLineType_SingleSegment = 0, LOLinearDimensionLeaderLineType_TwoSegment, LOLinearDimensionLeaderLineType_Bezier, LOLinearDimensionLeaderLineType_Hidden, LONumLinearDimensionLeaderLineTypes } |
Defines the different types of leader lines for a linear dimension entity. More... | |
Functions | |
LO_RESULT | LOLinearDimensionCreate (LOLinearDimensionRef *dimension, const LOPoint2D *start_point, const LOPoint2D *end_point, double height) |
Creates a new disconnected linear dimension object. More... | |
LO_RESULT | LOLinearDimensionAddReference (LOLinearDimensionRef dimension) |
Adds a reference to a linear dimension object. More... | |
LO_RESULT | LOLinearDimensionRelease (LOLinearDimensionRef *dimension) |
Releases a linear dimension object. The object will be invalidated if releasing the last reference. More... | |
LO_EXPORT LOLinearDimensionRef | LOLinearDimensionFromEntity (LOEntityRef entity) |
Converts from a LOEntityRef to a LOLinearDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLinearDimensionRef. More... | |
LO_EXPORT LOEntityRef | LOLinearDimensionToEntity (LOLinearDimensionRef dimension) |
Converts from a LOLinearDimensionRef to a LOEntityRef. This is essentially an upcast operation. More... | |
LO_RESULT | LOLinearDimensionGetExplodedEntities (LOLinearDimensionRef dimension, LOEntityListRef entity_list) |
Creates the entities that represent the dimension in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released. Depending on the appearance of the dimension being exploded, this may return anywhere from four to six entities. Start extension line, end extension line, one or two dimension lines, dimension text, optional leader line. More... | |
LO_RESULT | LOLinearDimensionGetUsesCustomText (LOLinearDimensionRef dimension, bool *use_custom_text) |
Gets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically. More... | |
LO_RESULT | LOLinearDimensionSetUsesCustomText (LOLinearDimensionRef dimension, bool use_custom_text) |
Sets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically. More... | |
LO_RESULT | LOLinearDimensionCreateDimensionTextCopy (LOLinearDimensionRef dimension, LOFormattedTextRef *text) |
Creates a copy of the dimension text's LOFormattedTextRef object. More... | |
LO_RESULT | LOLinearDimensionSetDimensionText (LOLinearDimensionRef dimension, LOFormattedTextRef text) |
Sets the text of the dimension from a LOFormattedTextRef object. The dimension lines may be adjusted if the text has been re-positioned. More... | |
LO_RESULT | LOLinearDimensionGetLeaderLineType (LOLinearDimensionRef dimension, LOLinearDimensionLeaderLineType *leader_line_type) |
Gets the type of leader line the linear dimension is using. More... | |
LO_RESULT | LOLinearDimensionSetLeaderLineType (LOLinearDimensionRef dimension, LOLinearDimensionLeaderLineType leader_line_type) |
Sets the type of leader line the linear dimension is using. New control points will be generated if changing to a two segment or bezier leader line type. Setting the leader line type to LOLinearDimensionLeaderLineType_Hidden will not move the dimension text. More... | |
LO_RESULT | LOLinearDimensionGetUsesAutoScale (LOLinearDimensionRef dimension, bool *use_auto_scale) |
Gets whether or not the scale for the dimension length text is set automatically. More... | |
LO_RESULT | LOLinearDimensionSetUsesAutoScale (LOLinearDimensionRef dimension, bool use_auto_scale) |
Sets whether or not the scale for the dimension length text is set automatically. More... | |
LO_RESULT | LOLinearDimensionGetScale (LOLinearDimensionRef dimension, double *scale) |
Gets the scale being used for the dimension length text. More... | |
LO_RESULT | LOLinearDimensionSetScale (LOLinearDimensionRef dimension, double scale) |
Sets the scale being used for the dimension length text. This will also make the scale not use auto-scale. More... | |
LO_RESULT | LOLinearDimensionGetStartConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the first connection. More... | |
LO_RESULT | LOLinearDimensionSetStartConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Sets the page location for the first connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo. More... | |
LO_RESULT | LOLinearDimensionGetEndConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the second connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo. More... | |
LO_RESULT | LOLinearDimensionSetEndConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Sets the page location for the second connection. More... | |
LO_RESULT | LOLinearDimensionGetStartExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the start of the dimension line. More... | |
LO_RESULT | LOLinearDimensionSetStartExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Sets the page location for the start of the dimension line. This will also adjust the end of the dimension line to maintain the correct dimension line length. More... | |
LO_RESULT | LOLinearDimensionGetEndExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the end of the dimension line. More... | |
LO_RESULT | LOLinearDimensionSetEndExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Sets the page location for the end of the dimension line. This will also adjust the start of the dimension line to maintain the correct dimension line length. More... | |
LO_RESULT | LOLinearDimensionGetStartOffsetPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the start of the first extension line. The first extension line runs from this offset point to the start extent point. More... | |
LO_RESULT | LOLinearDimensionGetEndOffsetPoint (LOLinearDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the start of the second extension line. The second extension line runs from this offset point to the end extent point. More... | |
LO_RESULT | LOLinearDimensionSetStartOffsetLength (LOLinearDimensionRef dimension, double length) |
Sets the length of the offset from the first connection point to the start of the first extension line. The connection and extent points will not move. More... | |
LO_RESULT | LOLinearDimensionSetEndOffsetLength (LOLinearDimensionRef dimension, double length) |
Sets the length of the offset from the second connection point to the start of the second extension line. The connection and extent points will not move. More... | |
LO_RESULT | LOLinearDimensionConnectTo (LOLinearDimensionRef dimension, LOConnectionPointRef start_point, LOConnectionPointRef end_point) |
Connects the linear dimension to the given connection points. If both the linear dimension and the connection point's entities are on non-shared layers, they must be on the same page. More... | |
LO_RESULT | LOLinearDimensionDisconnect (LOLinearDimensionRef dimension) |
Disconnects the linear dimension from its connection points. The dimension will not be adjusted by disconnecting from its connection points. More... | |
Defines the different types of leader lines for a linear dimension entity.
LO_RESULT LOLinearDimensionAddReference | ( | LOLinearDimensionRef | dimension | ) |
Adds a reference to a linear dimension object.
[in] | dimension | The linear dimension object. |
LO_RESULT LOLinearDimensionConnectTo | ( | LOLinearDimensionRef | dimension, |
LOConnectionPointRef | start_point, | ||
LOConnectionPointRef | end_point | ||
) |
Connects the linear dimension to the given connection points. If both the linear dimension and the connection point's entities are on non-shared layers, they must be on the same page.
[in] | dimension | The linear dimension object. |
[in] | start_point | The first connection point object. |
[in] | end_point | The second connection point object. |
LO_RESULT LOLinearDimensionCreate | ( | LOLinearDimensionRef * | dimension, |
const LOPoint2D * | start_point, | ||
const LOPoint2D * | end_point, | ||
double | height | ||
) |
Creates a new disconnected linear dimension object.
[out] | dimension | The linear dimension object |
[in] | start_point | Where the dimension should start |
[in] | end_point | Where the dimension should end |
[in] | height | Distance from the start and end points to the dimension line |
LO_RESULT LOLinearDimensionCreateDimensionTextCopy | ( | LOLinearDimensionRef | dimension, |
LOFormattedTextRef * | text | ||
) |
Creates a copy of the dimension text's LOFormattedTextRef object.
[in] | dimension | The linear dimension object. |
[out] | text | The formatted text object. |
LO_RESULT LOLinearDimensionDisconnect | ( | LOLinearDimensionRef | dimension | ) |
Disconnects the linear dimension from its connection points. The dimension will not be adjusted by disconnecting from its connection points.
[in] | dimension | The linear dimension object. |
LO_EXPORT LOLinearDimensionRef LOLinearDimensionFromEntity | ( | LOEntityRef | entity | ) |
Converts from a LOEntityRef to a LOLinearDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLinearDimensionRef.
[in] | entity | The entity object. |
LO_RESULT LOLinearDimensionGetEndConnectionPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the second connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the second control point. |
LO_RESULT LOLinearDimensionGetEndExtentPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the end of the dimension line.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the end of the dimension line. |
LO_RESULT LOLinearDimensionGetEndOffsetPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the start of the second extension line. The second extension line runs from this offset point to the end extent point.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the end of the dimension line. |
LO_RESULT LOLinearDimensionGetExplodedEntities | ( | LOLinearDimensionRef | dimension, |
LOEntityListRef | entity_list | ||
) |
Creates the entities that represent the dimension in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released. Depending on the appearance of the dimension being exploded, this may return anywhere from four to six entities. Start extension line, end extension line, one or two dimension lines, dimension text, optional leader line.
[in] | dimension | The linear dimension object. |
[in] | entity_list | The entity list object to add the new entities to. |
LO_RESULT LOLinearDimensionGetLeaderLineType | ( | LOLinearDimensionRef | dimension, |
LOLinearDimensionLeaderLineType * | leader_line_type | ||
) |
Gets the type of leader line the linear dimension is using.
[in] | dimension | The linear dimension object. |
[out] | leader_line_type | The leader line type. |
LO_RESULT LOLinearDimensionGetScale | ( | LOLinearDimensionRef | dimension, |
double * | scale | ||
) |
Gets the scale being used for the dimension length text.
[in] | dimension | The linear dimension object. |
[out] | scale | The dimension text scale. |
LO_RESULT LOLinearDimensionGetStartConnectionPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the first connection.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the first connection point. |
LO_RESULT LOLinearDimensionGetStartExtentPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the start of the dimension line.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the start of the dimension line. |
LO_RESULT LOLinearDimensionGetStartOffsetPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the start of the first extension line. The first extension line runs from this offset point to the start extent point.
[in] | dimension | The linear dimension object. |
[out] | point | The position of the start of the extension line. |
LO_RESULT LOLinearDimensionGetUsesAutoScale | ( | LOLinearDimensionRef | dimension, |
bool * | use_auto_scale | ||
) |
Gets whether or not the scale for the dimension length text is set automatically.
[in] | dimension | The linear dimension object. |
[out] | use_auto_scale | Whether the dimension is using auto scale or not. |
LO_RESULT LOLinearDimensionGetUsesCustomText | ( | LOLinearDimensionRef | dimension, |
bool * | use_custom_text | ||
) |
Gets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically.
[in] | dimension | The linear dimension object. |
[out] | use_custom_text | Whether the dimension uses custom text. |
LO_RESULT LOLinearDimensionRelease | ( | LOLinearDimensionRef * | dimension | ) |
Releases a linear dimension object. The object will be invalidated if releasing the last reference.
[in] | dimension | The linear dimension object. |
LO_RESULT LOLinearDimensionSetDimensionText | ( | LOLinearDimensionRef | dimension, |
LOFormattedTextRef | text | ||
) |
Sets the text of the dimension from a LOFormattedTextRef object. The dimension lines may be adjusted if the text has been re-positioned.
[in] | dimension | The linear dimension object. |
[in] | text | The formatted text object. |
LO_RESULT LOLinearDimensionSetEndConnectionPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Sets the page location for the second connection.
[in] | dimension | The linear dimension object. |
[in] | point | The position for the second control point. |
LO_RESULT LOLinearDimensionSetEndExtentPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Sets the page location for the end of the dimension line. This will also adjust the start of the dimension line to maintain the correct dimension line length.
[in] | dimension | The linear dimension object. |
[in] | point | The position of the end of the dimension line. |
LO_RESULT LOLinearDimensionSetEndOffsetLength | ( | LOLinearDimensionRef | dimension, |
double | length | ||
) |
Sets the length of the offset from the second connection point to the start of the second extension line. The connection and extent points will not move.
[in] | dimension | The linear dimension object. |
[in] | length | The length the offset to the extension line should be. |
LO_RESULT LOLinearDimensionSetLeaderLineType | ( | LOLinearDimensionRef | dimension, |
LOLinearDimensionLeaderLineType | leader_line_type | ||
) |
Sets the type of leader line the linear dimension is using. New control points will be generated if changing to a two segment or bezier leader line type. Setting the leader line type to LOLinearDimensionLeaderLineType_Hidden will not move the dimension text.
[in] | dimension | The linear dimension object. |
[in] | leader_line_type | The leader line type. |
LO_RESULT LOLinearDimensionSetScale | ( | LOLinearDimensionRef | dimension, |
double | scale | ||
) |
Sets the scale being used for the dimension length text. This will also make the scale not use auto-scale.
[in] | dimension | The linear dimension object. |
[in] | scale | The new scale to use. |
LO_RESULT LOLinearDimensionSetStartConnectionPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Sets the page location for the first connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo.
[in] | dimension | The linear dimension object. |
[in] | point | The position for the first connection point. |
LO_RESULT LOLinearDimensionSetStartExtentPoint | ( | LOLinearDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Sets the page location for the start of the dimension line. This will also adjust the end of the dimension line to maintain the correct dimension line length.
[in] | dimension | The linear dimension object. |
[in] | point | The position of the start of the dimension line. |
LO_RESULT LOLinearDimensionSetStartOffsetLength | ( | LOLinearDimensionRef | dimension, |
double | length | ||
) |
Sets the length of the offset from the first connection point to the start of the first extension line. The connection and extent points will not move.
[in] | dimension | The linear dimension object. |
[in] | length | The length the offset to the extension line should be. |
LO_RESULT LOLinearDimensionSetUsesAutoScale | ( | LOLinearDimensionRef | dimension, |
bool | use_auto_scale | ||
) |
Sets whether or not the scale for the dimension length text is set automatically.
[in] | dimension | The linear dimension object. |
[in] | use_auto_scale | Whether the dimension should use auto scale or not. |
LO_RESULT LOLinearDimensionSetUsesCustomText | ( | LOLinearDimensionRef | dimension, |
bool | use_custom_text | ||
) |
Sets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically.
[in] | dimension | The linear dimension object. |
[in] | use_custom_text | Whether or not the dimension should use custom text. |
LO_EXPORT LOEntityRef LOLinearDimensionToEntity | ( | LOLinearDimensionRef | dimension | ) |
Converts from a LOLinearDimensionRef to a LOEntityRef. This is essentially an upcast operation.
[in] | dimension | The linear dimension object. |