LayOut C API
|
#include <LayOutAPI/common.h>
#include <LayOutAPI/geometry/geometry.h>
#include <LayOutAPI/model/defs.h>
#include <LayOutAPI/model/formattedtext.h>
Go to the source code of this file.
Enumerations | |
enum | LOLabelLeaderLineType { LOLabelLeaderLineType_SingleSegment = 0, LOLabelLeaderLineType_TwoSegment, LOLabelLeaderLineType_Bezier, LOLabelLeaderLineType_Unknown, LONumLabelLeaderLineTypes } |
Defines the different types of leader lines for a label entity. More... | |
enum | LOLabelTextConnectionType { LOLabelTextConnectionType_NoConnection = 0, LOLabelTextConnectionType_Automatic, LOLabelTextConnectionType_ReverseAutomatic, LOLabelTextConnectionType_TopLeft, LOLabelTextConnectionType_CenterLeft, LOLabelTextConnectionType_BottomLeft, LOLabelTextConnectionType_TopRight, LOLabelTextConnectionType_CenterRight, LOLabelTextConnectionType_BottomRight, LONumLabelTextConnectionTypes } |
Defines the different types of label text connections for a label entity. More... | |
Functions | |
LO_RESULT | LOLabelCreateAtPoint (LOLabelRef *label, const LOPoint2D *anchor_point, LOFormattedTextAnchorType anchor_type, const char *plain_text, LOLabelLeaderLineType leader_line_type, const LOPoint2D *target_point) |
Creates a new disconnected label object whose text is unbounded. More... | |
LO_RESULT | LOLabelCreateWithBounds (LOLabelRef *label, const LOAxisAlignedRect2D *bounds, const char *plain_text, LOLabelLeaderLineType leader_line_type, const LOPoint2D *target_point) |
Creates a new disconnected label object whose text is bounded. More... | |
LO_RESULT | LOLabelAddReference (LOLabelRef label) |
Adds a reference to a label object. More... | |
LO_RESULT | LOLabelRelease (LOLabelRef *label) |
Releases a label object. The object will be invalidated if releasing the last reference. More... | |
LO_EXPORT LOLabelRef | LOLabelFromEntity (LOEntityRef entity) |
Converts from a LOEntityRef to a LOLabelRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLabelRef. More... | |
LO_EXPORT LOEntityRef | LOLabelToEntity (LOLabelRef label) |
Converts from a LOLabelRef to a LOEntityRef. This is essentially an upcast operation. More... | |
LO_RESULT | LOLabelGetExplodedEntities (LOLabelRef label, LOEntityListRef entity_list, LOPageRef page_for_autotext) |
Creates the entities that represent the label 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. More... | |
LO_RESULT | LOLabelConnectTo (LOLabelRef label, LOConnectionPointRef connection_point) |
Connects the label to the given connection point. The leader line will be adjusted to point at the connection point. The label must be in the same document as the connection point. If both the label and the connection point's entity are on non-shared layers, they must be on the same page. More... | |
LO_RESULT | LOLabelDisconnect (LOLabelRef label) |
Disconnects the label from its connection point. The leader line will not be adjusted by disconnecting from a connection point. More... | |
LO_RESULT | LOLabelCreateLabelTextCopy (LOLabelRef label, LOFormattedTextRef *text) |
Creates a copy of the label text's LOFormattedTextRef object. More... | |
LO_RESULT | LOLabelCreateLabelDisplayTextCopy (LOLabelRef label, LOPageRef page, LOFormattedTextRef *text) |
Creates a copy of the label text's LOFormattedTextRef object. This copy will have all auto text tags substituted with the display text. A valid page object must be provided for page name/number auto text to be correctly substituted. More... | |
LO_RESULT | LOLabelSetLabelText (LOLabelRef label, LOFormattedTextRef text) |
Sets the text of a label from a LOFormattedTextRef object. The leader line will be adjusted to connect to the new label text if its bounds are different. More... | |
LO_RESULT | LOLabelCreateLeaderLineCopy (LOLabelRef label, LOPathRef *path) |
Creates a copy of the label leader's LOPathRef object. More... | |
LO_RESULT | LOLabelSetLeaderLine (LOLabelRef label, LOPathRef path) |
Sets the leader line of a label from a LOPathRef object. The label text position will change to remain connected to the end point of the leader line. The leader line type may change based on number and types of points in the path. More... | |
LO_RESULT | LOLabelGetLeaderLineType (LOLabelRef label, LOLabelLeaderLineType *leader_line_type) |
Gets the type of leader line the label is using. If the leader line has been customized, the type may be unknown. More... | |
LO_RESULT | LOLabelSetLeaderLineType (LOLabelRef label, LOLabelLeaderLineType leader_line_type) |
Sets the type of leader line the label is using. New control points will be generated if changing to a two segment or bezier leader line type. More... | |
LO_RESULT | LOLabelGetTextConnectionType (LOLabelRef label, LOLabelTextConnectionType *text_connection_type) |
Gets the type of connection between the label text and leader line. More... | |
LO_RESULT | LOLabelSetTextConnectionType (LOLabelRef label, LOLabelTextConnectionType text_connection_type) |
Sets the type of connection between the label text and leader line. The text position will change to account for a change in text connection type. More... | |
Defines the different types of leader lines for a label entity.
Defines the different types of label text connections for a label entity.
LO_RESULT LOLabelAddReference | ( | LOLabelRef | label | ) |
Adds a reference to a label object.
[in] | label | The label object. |
LO_RESULT LOLabelConnectTo | ( | LOLabelRef | label, |
LOConnectionPointRef | connection_point | ||
) |
Connects the label to the given connection point. The leader line will be adjusted to point at the connection point. The label must be in the same document as the connection point. If both the label and the connection point's entity are on non-shared layers, they must be on the same page.
[in] | label | The label object. |
[in] | connection_point | The connection point object. |
LO_RESULT LOLabelCreateAtPoint | ( | LOLabelRef * | label, |
const LOPoint2D * | anchor_point, | ||
LOFormattedTextAnchorType | anchor_type, | ||
const char * | plain_text, | ||
LOLabelLeaderLineType | leader_line_type, | ||
const LOPoint2D * | target_point | ||
) |
Creates a new disconnected label object whose text is unbounded.
[out] | label | The label object. |
[in] | anchor_point | The anchor point for the label text's position. |
[in] | anchor_type | Defines which point of the label text is set by anchor_point. |
[in] | plain_text | The plain text to use for the label text. |
[in] | leader_line_type | The type of leader line this label will have. |
[in] | target_point | Where the label leader should point to. |
LO_RESULT LOLabelCreateLabelDisplayTextCopy | ( | LOLabelRef | label, |
LOPageRef | page, | ||
LOFormattedTextRef * | text | ||
) |
Creates a copy of the label text's LOFormattedTextRef object. This copy will have all auto text tags substituted with the display text. A valid page object must be provided for page name/number auto text to be correctly substituted.
[in] | label | The label object. |
[in] | page | The page object. |
[out] | text | A copy of the formatted text object representing the label display text. |
LO_RESULT LOLabelCreateLabelTextCopy | ( | LOLabelRef | label, |
LOFormattedTextRef * | text | ||
) |
Creates a copy of the label text's LOFormattedTextRef object.
[in] | label | The label object. |
[out] | text | A copy of the formatted text object representing the label text. |
LO_RESULT LOLabelCreateLeaderLineCopy | ( | LOLabelRef | label, |
LOPathRef * | path | ||
) |
Creates a copy of the label leader's LOPathRef object.
[in] | label | The label object. |
[out] | path | A copy of the path object representing the label leader. |
LO_RESULT LOLabelCreateWithBounds | ( | LOLabelRef * | label, |
const LOAxisAlignedRect2D * | bounds, | ||
const char * | plain_text, | ||
LOLabelLeaderLineType | leader_line_type, | ||
const LOPoint2D * | target_point | ||
) |
Creates a new disconnected label object whose text is bounded.
[out] | label | The label object. |
[in] | bounds | The label text bounds. |
[in] | plain_text | The plain text to use as the label text. |
[in] | leader_line_type | The type of leader line this label will have. |
[in] | target_point | Where the label leader should point to. |
LO_RESULT LOLabelDisconnect | ( | LOLabelRef | label | ) |
Disconnects the label from its connection point. The leader line will not be adjusted by disconnecting from a connection point.
[in] | label | The label object. |
LO_EXPORT LOLabelRef LOLabelFromEntity | ( | LOEntityRef | entity | ) |
Converts from a LOEntityRef to a LOLabelRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLabelRef.
[in] | entity | The entity object. |
LO_RESULT LOLabelGetExplodedEntities | ( | LOLabelRef | label, |
LOEntityListRef | entity_list, | ||
LOPageRef | page_for_autotext | ||
) |
Creates the entities that represent the label 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.
[in] | label | The label object. |
[in] | entity_list | The entity list object to add the new entities to. |
[in] | page_for_autotext | The page that is currently being imported, exported, or displayed. This must be a valid object if auto text tags should be substituted with their display representations in the text that is returned. Otherwise, this object may be invalid. |
LO_RESULT LOLabelGetLeaderLineType | ( | LOLabelRef | label, |
LOLabelLeaderLineType * | leader_line_type | ||
) |
Gets the type of leader line the label is using. If the leader line has been customized, the type may be unknown.
[in] | label | The label object. |
[out] | leader_line_type | The leader line type. |
LO_RESULT LOLabelGetTextConnectionType | ( | LOLabelRef | label, |
LOLabelTextConnectionType * | text_connection_type | ||
) |
Gets the type of connection between the label text and leader line.
[in] | label | The label object. |
[out] | text_connection_type | The text connection type. |
LO_RESULT LOLabelRelease | ( | LOLabelRef * | label | ) |
Releases a label object. The object will be invalidated if releasing the last reference.
[in] | label | The label object. |
LO_RESULT LOLabelSetLabelText | ( | LOLabelRef | label, |
LOFormattedTextRef | text | ||
) |
Sets the text of a label from a LOFormattedTextRef object. The leader line will be adjusted to connect to the new label text if its bounds are different.
[in] | label | The label object. |
[in] | text | The formatted text object representing the label text. |
LO_RESULT LOLabelSetLeaderLine | ( | LOLabelRef | label, |
LOPathRef | path | ||
) |
Sets the leader line of a label from a LOPathRef object. The label text position will change to remain connected to the end point of the leader line. The leader line type may change based on number and types of points in the path.
[in] | label | The label object. |
[in] | path | The path object representing the label leader. |
LO_RESULT LOLabelSetLeaderLineType | ( | LOLabelRef | label, |
LOLabelLeaderLineType | leader_line_type | ||
) |
Sets the type of leader line the label is using. New control points will be generated if changing to a two segment or bezier leader line type.
[in] | label | The label object. |
[in] | leader_line_type | The leader line type. |
LO_RESULT LOLabelSetTextConnectionType | ( | LOLabelRef | label, |
LOLabelTextConnectionType | text_connection_type | ||
) |
Sets the type of connection between the label text and leader line. The text position will change to account for a change in text connection type.
[in] | label | The label object. |
[in] | text_connection_type | The text connection type. |
LO_EXPORT LOEntityRef LOLabelToEntity | ( | LOLabelRef | label | ) |
Converts from a LOLabelRef to a LOEntityRef. This is essentially an upcast operation.
[in] | label | The label object. |