AnchorShapeElement

class AnchorShapeElement : public HPS::ShapeElement

The AnchorShapeElement class is a user space object. It is used to define anchor elements to make up shapes for text backgrounds. Anchor points are point to which text leader lines connect. If no anchor elements are defined, all ShapePoints used to construct the shape will be used as anchor points. If at least one anchor point is defined, only explicitly defined anchor points will be used.

Public Functions

AnchorShapeElement()

The default constructor creates an empty AnchorShapeElement object.

AnchorShapeElement(AnchorShapeElement &&in_that)

The move constructor creates a AnchorShapeElement by transferring the underlying impl of the rvalue reference to this AnchorShapeElement thereby avoiding a copy and allocation.

Parameters:

in_that – An rvalue reference to a AnchorShapeElement to take the impl from.

AnchorShapeElement(AnchorShapeElement const &in_that)

The copy constructor creates a AnchorShapeElement AnchorShapeElement object that contains the same settings as the source AnchorShapeElement.

Parameters:

in_that – The source CircleShapeElement to copy.

AnchorShapeElement(ShapeElement const &in_that)

This constructor creates a AnchorShapeElement object that contains the same settings as the source ShapeElement. The copy will only be successful if the source shape element is really an upcast of an anchor shape element. Otherwise the copy will fail and the resulting AnchorShapeElement will be invalid.

Parameters:

in_that – The source ShapeElement to copy.

explicit AnchorShapeElement(ShapePoint const &in_anchor_point)

This constructor creates a AnchorShapeElement with the specified anchor point.

Parameters:

in_anchor_point – The anchor point.

explicit AnchorShapeElement(ShapePoint const &in_anchor_point, ShapePointArray const &in_intermediate_points, bool in_connection)

This constructor creates a AnchorShapeElement with the specified parameters.

Parameters:
  • in_anchor_point – The anchor point.

  • in_intermediate_points – Intermediate points between the leader line and the anchor point

  • in_connection – Whether the first intermediate point is connected to the anchor point by a line.

inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns:

The declared type of the object in question, which may differ from the true, underlying type.

AnchorShapeElement &operator=(AnchorShapeElement &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this AnchorShapeElement thereby avoiding a copy.

Parameters:

in_that – An rvalue reference to a AnchorShapeElement to take the impl from.

Returns:

A reference to this AnchorShapeElement.

AnchorShapeElement &SetAnchor(ShapePoint const &in_anchor)

Sets the anchor point for this AnchorShapeElement.

Parameters:

in_anchor – The anchor point.

AnchorShapeElement &SetConnection(bool in_connection)

Sets the connection setting for this AnchorShapeElement.

Parameters:

in_connection – Whether the first intermediate point connects to the anchor point.

AnchorShapeElement &SetIntermediatePoints(ShapePointArray const &in_intermediate_points)

Sets the intermediate points for this AnchorShapeElement.

Parameters:

in_intermediate_points – The points between the anchor and the leader line.

bool ShowAnchor(ShapePoint &out_anchor) const

Shows the anchor for this AnchorShapeElement.

Parameters:

out_anchor – The anchor point.

Returns:

true if an anchor point was set, false otherwise.

bool ShowConnection(bool &out_connection) const

Shows the connection setting for this AnchorShapeElement.

Parameters:

out_connection – Whether the first intermediate point connects to the anchor point.

Returns:

true if a connection setting was set, false otherwise.

bool ShowIntermediatePoints(ShapePointArray &out_intermediate_points) const

Shows the intermediate points for this AnchorShapeElement.

Parameters:

out_intermediate_points – The points between the anchor point and the leader line.

Returns:

true if intermediate points were set, false otherwise.

AnchorShapeElement &UnsetConnection()

Unsets the connection setting for this AnchorShapeElement.

AnchorShapeElement &UnsetIntermediatePoints()

Unsets the intermediate points for this AnchorShapeElement.

~AnchorShapeElement()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::AnchorShapeElement