Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Avoid::ReferencingPolygon Class Reference

A Polygon which just references its points from other Polygons. More...

#include <geomtypes.h>

Inheritance diagram for Avoid::ReferencingPolygon:
Avoid::PolygonInterface

Public Member Functions

 ReferencingPolygon ()
 
 ReferencingPolygon (const Polygon &poly, const Router *router)
 
void clear (void)
 Resets this to the empty polygon.
 
bool empty (void) const
 Returns true if this polygon is empty.
 
size_t size (void) const
 Returns the number of points in this polygon.
 
int id (void) const
 Returns the ID value associated with this polygon.
 
const Pointat (size_t index) const
 Returns a specific point in the polygon.
 
- Public Member Functions inherited from Avoid::PolygonInterface
 PolygonInterface ()
 Constructor.
 
virtual ~PolygonInterface ()
 Destructor.
 
Polygon boundingRectPolygon (void) const
 Returns the bounding rectangle for this polygon.
 
Box offsetBoundingBox (double offset) const
 Returns the bounding rectangle that contains this polygon with optionally some buffer space around it for routing.
 
Polygon offsetPolygon (double offset) const
 

Public Attributes

int _id
 
std::vector< std::pair< const Polygon *, unsigned short > > psRef
 
std::vector< PointpsPoints
 

Detailed Description

A Polygon which just references its points from other Polygons.

This type of Polygon is used to accurately represent cluster boundaries made up from the corner points of shapes.

Definition at line 336 of file geomtypes.h.

Constructor & Destructor Documentation

◆ ReferencingPolygon() [1/2]

Avoid::ReferencingPolygon::ReferencingPolygon ( )

Definition at line 159 of file geomtypes.cpp.

References clear().

◆ ReferencingPolygon() [2/2]

Avoid::ReferencingPolygon::ReferencingPolygon ( const Polygon poly,
const Router router 
)

Member Function Documentation

◆ at()

const Point & Avoid::ReferencingPolygon::at ( size_t  index) const
virtual

Returns a specific point in the polygon.

Parameters
[in]indexThe array index of the point to be returned.

Implements Avoid::PolygonInterface.

Definition at line 191 of file geomtypes.cpp.

References index, Avoid::Polygon::ps, psPoints, psRef, Avoid::Polygon::size(), and size().

Referenced by Avoid::Router::outputInstanceToSVG().

◆ clear()

void Avoid::ReferencingPolygon::clear ( void  )
virtual

Resets this to the empty polygon.

Implements Avoid::PolygonInterface.

Definition at line 166 of file geomtypes.cpp.

References psPoints, and psRef.

Referenced by ReferencingPolygon().

◆ empty()

bool Avoid::ReferencingPolygon::empty ( void  ) const
virtual

Returns true if this polygon is empty.

Implements Avoid::PolygonInterface.

Definition at line 173 of file geomtypes.cpp.

References psRef.

◆ id()

int Avoid::ReferencingPolygon::id ( void  ) const
virtual

Returns the ID value associated with this polygon.

Implements Avoid::PolygonInterface.

Definition at line 185 of file geomtypes.cpp.

References _id.

◆ size()

size_t Avoid::ReferencingPolygon::size ( void  ) const
virtual

Returns the number of points in this polygon.

Implements Avoid::PolygonInterface.

Definition at line 179 of file geomtypes.cpp.

References psRef.

Referenced by at(), and Avoid::Router::outputInstanceToSVG().

Member Data Documentation

◆ _id

int Avoid::ReferencingPolygon::_id

Definition at line 347 of file geomtypes.h.

Referenced by id().

◆ psPoints

std::vector<Point> Avoid::ReferencingPolygon::psPoints

Definition at line 349 of file geomtypes.h.

Referenced by at(), clear(), and ReferencingPolygon().

◆ psRef

std::vector<std::pair<const Polygon *, unsigned short> > Avoid::ReferencingPolygon::psRef

Definition at line 348 of file geomtypes.h.

Referenced by at(), clear(), empty(), ReferencingPolygon(), and size().


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