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 | LOAngularDimensionLeaderLineType { LOAngularDimensionLeaderLineType_SingleSegment = 0, LOAngularDimensionLeaderLineType_TwoSegment, LOAngularDimensionLeaderLineType_Bezier, LOAngularDimensionLeaderLineType_Hidden, LONumAngularDimensionLeaderLineTypes } |
Defines the different types of leader lines for an angular dimension entity. More... | |
Functions | |
LO_RESULT | LOAngularDimensionCreate (LOAngularDimensionRef *dimension, const LOPoint2D *start_point, const LOPoint2D *end_point, const LOPoint2D *start_extent_point, const LOPoint2D *end_extent_point, bool inner_angle) |
Creates a new disconnected angular dimension object. The arc center point is defined implicitly by the intersection of the two extension lines, and the radius is defined implicitly by the distance of the extent points from the arc center point. If the extent points are not equidistant from the arc center point, then the end extent point is adjusted automatically. More... | |
LO_RESULT | LOAngularDimensionAddReference (LOAngularDimensionRef dimension) |
Adds a reference to an angular dimension object. More... | |
LO_RESULT | LOAngularDimensionRelease (LOAngularDimensionRef *dimension) |
Releases an angular dimension object. The object will be invalidated if releasing the last reference. More... | |
LO_EXPORT LOAngularDimensionRef | LOAngularDimensionFromEntity (LOEntityRef entity) |
Converts from a LOEntityRef to a LOAngularDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOAngularDimensionRef. More... | |
LO_EXPORT LOEntityRef | LOAngularDimensionToEntity (LOAngularDimensionRef dimension) |
Converts from a LOAngularDimensionRef to a LOEntityRef. This is essentially an upcast operation. More... | |
LO_RESULT | LOAngularDimensionGetExplodedEntities (LOAngularDimensionRef 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 | LOAngularDimensionGetUsesCustomText (LOAngularDimensionRef 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 | LOAngularDimensionSetUsesCustomText (LOAngularDimensionRef 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 | LOAngularDimensionCreateDimensionTextCopy (LOAngularDimensionRef dimension, LOFormattedTextRef *text) |
Creates a copy of the dimension text's LOFormattedTextRef object. More... | |
LO_RESULT | LOAngularDimensionSetDimensionText (LOAngularDimensionRef 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 | LOAngularDimensionGetLeaderLineType (LOAngularDimensionRef dimension, LOAngularDimensionLeaderLineType *leader_line_type) |
Gets the type of leader line the angular dimension is using. More... | |
LO_RESULT | LOAngularDimensionSetLeaderLineType (LOAngularDimensionRef dimension, LOAngularDimensionLeaderLineType leader_line_type) |
Sets the type of leader line the angular 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 LOAngularDimensionLeaderLineType_Hidden will not move the dimension text. More... | |
LO_RESULT | LOAngularDimensionGetStartConnectionPoint (LOAngularDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the first connection. More... | |
LO_RESULT | LOAngularDimensionSetStartConnectionPoint (LOAngularDimensionRef dimension, const LOPoint2D *point) |
Sets the page location for the first connection. More... | |
LO_RESULT | LOAngularDimensionGetEndConnectionPoint (LOAngularDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the second connection. More... | |
LO_RESULT | LOAngularDimensionSetEndConnectionPoint (LOAngularDimensionRef dimension, const LOPoint2D *point) |
Sets the page location for the second connection. More... | |
LO_RESULT | LOAngularDimensionGetStartExtentPoint (LOAngularDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the start of the dimension line. More... | |
LO_RESULT | LOAngularDimensionSetStartExtentPoint (LOAngularDimensionRef dimension, const 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 | LOAngularDimensionGetEndExtentPoint (LOAngularDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the end of the dimension line. More... | |
LO_RESULT | LOAngularDimensionSetEndExtentPoint (LOAngularDimensionRef dimension, const 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 | LOAngularDimensionGetStartOffsetPoint (LOAngularDimensionRef 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 | LOAngularDimensionGetEndOffsetPoint (LOAngularDimensionRef 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 | LOAngularDimensionSetStartOffsetLength (LOAngularDimensionRef 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 | LOAngularDimensionSetEndOffsetLength (LOAngularDimensionRef 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 | LOAngularDimensionGetArcCenterPoint (LOAngularDimensionRef dimension, LOPoint2D *point) |
Gets the page location for the dimension arc center point. More... | |
LO_RESULT | LOAngularDimensionGetRadius (LOAngularDimensionRef dimension, double *radius) |
Gets the angular dimension's radius. This is the distance from the arc center point to the dimension line. More... | |
LO_RESULT | LOAngularDimensionSetRadius (LOAngularDimensionRef dimension, double radius) |
Sets the angular dimension's radius. This is the distance from the arc center point to the dimension line. More... | |
LO_RESULT | LOAngularDimensionGetAngle (LOAngularDimensionRef dimension, double *angle) |
Gets the angular dimension's angle. The angle is represented in radians. More... | |
Defines the different types of leader lines for an angular dimension entity.
LO_RESULT LOAngularDimensionAddReference | ( | LOAngularDimensionRef | dimension | ) |
Adds a reference to an angular dimension object.
[in] | dimension | The angular dimension object. |
LO_RESULT LOAngularDimensionCreate | ( | LOAngularDimensionRef * | dimension, |
const LOPoint2D * | start_point, | ||
const LOPoint2D * | end_point, | ||
const LOPoint2D * | start_extent_point, | ||
const LOPoint2D * | end_extent_point, | ||
bool | inner_angle | ||
) |
Creates a new disconnected angular dimension object. The arc center point is defined implicitly by the intersection of the two extension lines, and the radius is defined implicitly by the distance of the extent points from the arc center point. If the extent points are not equidistant from the arc center point, then the end extent point is adjusted automatically.
[out] | dimension | The angular dimension object |
[in] | start_point | Where the dimension should start |
[in] | end_point | Where the dimension should end |
[in] | start_extent_point | The extent point where the dimension line should start |
[in] | end_extent_point | The extent point where the dimension line should end |
[in] | inner_angle | Whether or not the dimension should measure the inner angle. If false, it will measure the outer angle. |
LO_RESULT LOAngularDimensionCreateDimensionTextCopy | ( | LOAngularDimensionRef | dimension, |
LOFormattedTextRef * | text | ||
) |
Creates a copy of the dimension text's LOFormattedTextRef object.
[in] | dimension | The angular dimension object. |
[out] | text | The formatted text object. |
LO_EXPORT LOAngularDimensionRef LOAngularDimensionFromEntity | ( | LOEntityRef | entity | ) |
Converts from a LOEntityRef to a LOAngularDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOAngularDimensionRef.
[in] | entity | The entity object. |
LO_RESULT LOAngularDimensionGetAngle | ( | LOAngularDimensionRef | dimension, |
double * | angle | ||
) |
Gets the angular dimension's angle. The angle is represented in radians.
[in] | dimension | The angular dimension object. |
[out] | angle | The dimension angle. |
LO_RESULT LOAngularDimensionGetArcCenterPoint | ( | LOAngularDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the dimension arc center point.
[in] | dimension | The angular dimension object. |
[out] | point | The position of the dimension arc center point. |
LO_RESULT LOAngularDimensionGetEndConnectionPoint | ( | LOAngularDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the second connection.
[in] | dimension | The angular dimension object. |
[out] | point | The position of the second control point. |
LO_RESULT LOAngularDimensionGetEndExtentPoint | ( | LOAngularDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the end of the dimension line.
[in] | dimension | The angular dimension object. |
[out] | point | The position of the end of the dimension line. |
LO_RESULT LOAngularDimensionGetEndOffsetPoint | ( | LOAngularDimensionRef | 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 angular dimension object. |
[out] | point | The position of the end of the dimension line. |
LO_RESULT LOAngularDimensionGetExplodedEntities | ( | LOAngularDimensionRef | 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 angular dimension object. |
[in] | entity_list | The entity list object to add the new entities to. |
LO_RESULT LOAngularDimensionGetLeaderLineType | ( | LOAngularDimensionRef | dimension, |
LOAngularDimensionLeaderLineType * | leader_line_type | ||
) |
Gets the type of leader line the angular dimension is using.
[in] | dimension | The angular dimension object. |
[out] | leader_line_type | The leader line type. |
LO_RESULT LOAngularDimensionGetRadius | ( | LOAngularDimensionRef | dimension, |
double * | radius | ||
) |
Gets the angular dimension's radius. This is the distance from the arc center point to the dimension line.
[in] | dimension | The angular dimension object. |
[out] | radius | The dimension radius. |
LO_RESULT LOAngularDimensionGetStartConnectionPoint | ( | LOAngularDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the first connection.
[in] | dimension | The angular dimension object. |
[out] | point | The position of the first connection point. |
LO_RESULT LOAngularDimensionGetStartExtentPoint | ( | LOAngularDimensionRef | dimension, |
LOPoint2D * | point | ||
) |
Gets the page location for the start of the dimension line.
[in] | dimension | The angular dimension object. |
[out] | point | The position of the start of the dimension line. |
LO_RESULT LOAngularDimensionGetStartOffsetPoint | ( | LOAngularDimensionRef | 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 angular dimension object. |
[out] | point | The position of the start of the extension line. |
LO_RESULT LOAngularDimensionGetUsesCustomText | ( | LOAngularDimensionRef | 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 angular dimension object. |
[out] | use_custom_text | Whether the dimension uses custom text. |
LO_RESULT LOAngularDimensionRelease | ( | LOAngularDimensionRef * | dimension | ) |
Releases an angular dimension object. The object will be invalidated if releasing the last reference.
[in] | dimension | The angular dimension object. |
LO_RESULT LOAngularDimensionSetDimensionText | ( | LOAngularDimensionRef | 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 angular dimension object. |
[in] | text | The formatted text object. |
LO_RESULT LOAngularDimensionSetEndConnectionPoint | ( | LOAngularDimensionRef | dimension, |
const LOPoint2D * | point | ||
) |
Sets the page location for the second connection.
[in] | dimension | The angular dimension object. |
[in] | point | The position for the second control point. |
LO_RESULT LOAngularDimensionSetEndExtentPoint | ( | LOAngularDimensionRef | dimension, |
const 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 angular dimension object. |
[in] | point | The position of the end of the dimension line. |
LO_RESULT LOAngularDimensionSetEndOffsetLength | ( | LOAngularDimensionRef | 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 angular dimension object. |
[in] | length | The length the offset to the extension line should be. |
LO_RESULT LOAngularDimensionSetLeaderLineType | ( | LOAngularDimensionRef | dimension, |
LOAngularDimensionLeaderLineType | leader_line_type | ||
) |
Sets the type of leader line the angular 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 LOAngularDimensionLeaderLineType_Hidden will not move the dimension text.
[in] | dimension | The angular dimension object. |
[in] | leader_line_type | The leader line type. |
LO_RESULT LOAngularDimensionSetRadius | ( | LOAngularDimensionRef | dimension, |
double | radius | ||
) |
Sets the angular dimension's radius. This is the distance from the arc center point to the dimension line.
[in] | dimension | The angular dimension object. |
[in] | radius | The dimension radius. |
LO_RESULT LOAngularDimensionSetStartConnectionPoint | ( | LOAngularDimensionRef | dimension, |
const LOPoint2D * | point | ||
) |
Sets the page location for the first connection.
[in] | dimension | The angular dimension object. |
[in] | point | The position for the first connection point. |
LO_RESULT LOAngularDimensionSetStartExtentPoint | ( | LOAngularDimensionRef | dimension, |
const 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 angular dimension object. |
[in] | point | The position of the start of the dimension line. |
LO_RESULT LOAngularDimensionSetStartOffsetLength | ( | LOAngularDimensionRef | 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 angular dimension object. |
[in] | length | The length the offset to the extension line should be. |
LO_RESULT LOAngularDimensionSetUsesCustomText | ( | LOAngularDimensionRef | 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 angular dimension object. |
[in] | use_custom_text | Whether or not the dimension should use custom text. |
LO_EXPORT LOEntityRef LOAngularDimensionToEntity | ( | LOAngularDimensionRef | dimension | ) |
Converts from a LOAngularDimensionRef to a LOEntityRef. This is essentially an upcast operation.
[in] | dimension | The angular dimension object. |