Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Avoid::Rectangle Class Reference

#include <geomtypes.h>

Inheritance diagram for Avoid::Rectangle:

Avoid::Polygon Avoid::PolygonInterface

List of all members.


Detailed Description

A Rectangle, a simpler way to define the polygon for square or rectangular shapes.

Definition at line 290 of file geomtypes.h.


Public Member Functions

const Pointat (size_t index) const
 Returns a specific point in the polygon.
void clear (void)
 Resets this to the empty polygon.
Polygon curvedPolyline (const double curve_amount, const bool closed=false) const
 Returns a curved approximation of this multi-segment PolyLine, with the corners replaced by smooth Bezier curves.
bool empty (void) const
 Returns true if this polygon is empty.
void getBoundingRect (double *minX, double *minY, double *maxX, double *maxY) const
 Returns the bounding rectangle that contains this polygon.
int id (void) const
 Returns the ID value associated with this polygon.
 Rectangle (const Point &centre, const double width, const double height)
 Constructs a rectangular polygon given the centre, width and height.
 Rectangle (const Point &topLeft, const Point &bottomRight)
 Constructs a rectangular polygon given two opposing corner points.
Polygon simplify (void) const
 Returns a simplified Polyline, where all collinear line segments have been collapsed down into single line segments.
size_t size (void) const
 Returns the number of points in this polygon.
void translate (const double xDist, const double yDist)
 Translates the polygon position by a relative amount.

Public Attributes

int _id
 An ID for the polygon.
std::vector< Pointps
 A vector of the points that make up the Polygon.
std::vector< char > ts
 If used, denotes whether the corresponding point in ps is a move-to operation or a Bezier curve-to.

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

Generated by  Doxygen 1.6.0   Back to index