LineShapeElement

class HPS::LineShapeElement : public HPS::ShapeElement

The LineShapeElement class is a user space object. It is used to define line elements to make up shapes for text backgrounds.

Public Functions

LineShapeElement()

The default constructor creates an empty LineShapeElement object.

LineShapeElement(LineShapeElement &&in_that)

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

Parameters

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

LineShapeElement(LineShapeElement const &in_that)

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

Parameters

in_that – The source LineShapeElement to copy.

LineShapeElement(ShapeElement const &in_that)

This constructor creates a LineShapeElement 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 a line shape element. Otherwise the copy will fail and the resulting LineShapeElement will be invalid.

Parameters

in_that – The source ShapeElement to copy.

LineShapeElement(ShapePoint const &in_start, ShapePoint const &in_end)

This constructor creates a two-point LineShapeElement with the specified points.

Parameters
  • in_start – The start of the line.

  • in_end – The end of the line.

explicit LineShapeElement(ShapePointArray const &in_points)

This constructor creates a LineShapeElement with the specified points.

Parameters

in_points – The points making up the line.

LineShapeElement(size_t in_count, ShapePoint const in_points[])

This constructor creates a LineShapeElement with the specified points.

Parameters
  • in_count – Size of the following array.

  • in_points – The points for the 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.

LineShapeElement &operator=(LineShapeElement &&in_that)

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

Parameters

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

Returns

A reference to this LineShapeElement.

LineShapeElement &SetPoints(ShapePointArray const &in_points)

Sets the points for this LineShapeElement.

Parameters

in_points – The points making up the line.

LineShapeElement &SetPoints(size_t in_count, ShapePoint const in_points[])

Sets the points for this LineShapeElement.

Parameters
  • in_count – The size of the following array.

  • in_points – The points making up the line.

bool ShowPoints(ShapePointArray &out_points) const

Shows the points for this LineShapeElement.

Parameters

out_points – The points for this line

Returns

true if points were set, false otherwise.

~LineShapeElement()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::LineShapeElement