Enrollment 28.2.0
Loading...
Searching...
No Matches
Polygon Class Referencefinal

It holds polygon points. More...

#include <ImageAttribute.h>

Collaboration diagram for Polygon:

Public Member Functions

void WriteTo (Writer &writer) const final
 Write itself into writer.
void AddPoint (const Point &point)
 Adds a point to the polygon.
void AddPoint (Point &&point)
 Adds a point to the polygon using move semantics.
const std::vector< Point > & GetPoints () const
 Retrieves the points describing the polygon.
 Polygon (std::vector< Point > &&points)
 Constructs a polygon with a given set of points using move semantics.
 Polygon (const std::vector< Point > &points)
 Constructs a polygon with a given set of points.

Detailed Description

It holds polygon points.

Constructor & Destructor Documentation

◆ Polygon() [1/2]

Polygon ( std::vector< Point > && points)
inlineexplicit

Constructs a polygon with a given set of points using move semantics.

Parameters
pointsPoint objects to initialize the polygon with.

◆ Polygon() [2/2]

Polygon ( const std::vector< Point > & points)
inlineexplicit

Constructs a polygon with a given set of points.

Parameters
pointsPoint objects to initialize the polygon with.

Member Function Documentation

◆ AddPoint() [1/2]

void AddPoint ( const Point & point)
inline

Adds a point to the polygon.

Parameters
pointThe point to add to the polygon.

◆ AddPoint() [2/2]

void AddPoint ( Point && point)
inline

Adds a point to the polygon using move semantics.

Parameters
pointThe point to be moved to the polygon.

◆ GetPoints()

const std::vector< Point > & GetPoints ( ) const
inlinenodiscard

Retrieves the points describing the polygon.

Returns
A const reference to points describing the polygon.

◆ WriteTo()

void WriteTo ( Writer & writer) const
inlinefinalvirtual

Write itself into writer.

Parameters
writerWriter to use to serialize this Serializable

Implements Serializable.


The documentation for this class was generated from the following file: