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

NameTypeAccessDescription
GeometryShapeGeometryShapeReadGets the geometry shape.
ShapeShapeReadGets the shape.

Methods

SignatureDescription
GeometryShape()GeometryShapeReturns the underlying GeometryShape object of the connector
Shape()ShapeReturns 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_tReturns nullptr — connector locks are not yet implemented.
as_i_geometry_shape()GeometryShapeReturns this connector as an IGeometryShape pointer.
start_shape_connected_to()ShapeReturns 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_tReturns 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()ShapeReturns 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_tReturns 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_nodeFind the p:cNvCxnSpPr element in the connector XML.
ensure_c_nv_cxn_sp_pr()pugi::xml_nodeGet or create the p:cNvCxnSpPr element.
find_shape_by_id(shape_id: std::uint32_t)ShapeSearch 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.

See Also