Connector
Overview
Connector is a class in Aspose.Slides FOSS for C++.
Represents a connector shape that links two shapes.
This class provides 20 methods for working with Connector objects in C++ programs.
Available methods include: Connector, GeometryShape, Shape, as_i_geometry_shape, connector_lock, end_shape_connected_to, end_shape_connection_site_index, ensure_c_nv_cxn_sp_pr, find_shape_by_id, get_c_nv_cxn_sp_pr, get_connection_point, reroute, and 6 additional methods.
All public members are accessible to any C++ application after installing the Aspose.Slides FOSS for C++ package.
Properties: GeometryShape, Shape.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
GeometryShape | GeometryShape | Read | Gets the geometry shape. |
Shape | Shape | Read | Gets the shape. |
Methods
| Signature | Description |
|---|---|
GeometryShape() → GeometryShape | Returns the underlying GeometryShape object of the connector |
Shape() → Shape | Returns the base Shape object representing the connector |
Shape() → Shape | |
Connector() | |
Connector(type: ShapeType, x: double, y: double, w: double, h: double) | |
connector_lock() → std::nullptr_t | Returns nullptr — connector locks are not yet implemented. |
as_i_geometry_shape() → GeometryShape | Returns this connector as an IGeometryShape pointer. |
start_shape_connected_to() → Shape | Returns the shape connected to the start of this connector. |
set_start_shape_connected_to(shape: Shape) | Sets the shape connected to the start and reroutes. |
start_shape_connection_site_index() → std::uint32_t | Returns the connection site index at the start shape. |
set_start_shape_connection_site_index(idx: std::uint32_t) | Sets the connection site index at the start shape and reroutes. |
end_shape_connected_to() → Shape | Returns the shape connected to the end of this connector. |
set_end_shape_connected_to(shape: Shape) | Sets the shape connected to the end and reroutes. |
end_shape_connection_site_index() → std::uint32_t | Returns the connection site index at the end shape. |
set_end_shape_connection_site_index(idx: std::uint32_t) | Sets the connection site index at the end shape and reroutes. |
reroute() | Reroutes the connector based on connected shapes and site indices. |
get_c_nv_cxn_sp_pr() → pugi::xml_node | Find the p:cNvCxnSpPr element in the connector XML. |
ensure_c_nv_cxn_sp_pr() → pugi::xml_node | Get or create the p:cNvCxnSpPr element. |
find_shape_by_id(shape_id: std::uint32_t) → Shape | Search parent slide shapes for a shape with the given cNvPr@id. |
get_connection_point(shape: Shape, site_index: std::uint32_t) → std::pair<double, double> | Returns (x, y) in points for a connection site on a shape. 4-site model: 0=top-center, 1=left-center, 2=bottom-center, 3=right-center. Falls back to shape center for out-of-range indices. |