#ifndef SHAPES_H
#define SHAPES_H
#include "common/Geometry.h"
struct PolyDef {
bool isEllipse;
double aspect; int sides, peripheries;
double perispacing,
rotation,
skew,distortion;
bool regular;
Coord interior_box, exterior_box; Line input; PolyDef() : isEllipse(false), aspect(1),sides(4),peripheries(0),perispacing(0),
rotation(0),skew(0),distortion(0),regular(false),
interior_box(0,0),exterior_box(0,0) {
}
};
extern void genpoly(const PolyDef &arg,Lines &out);
Coord polysize(const Line &poly);
struct BadPolyBounds : DGException {
BadPolyBounds() : DGException("must specify internal or external box of poly; no one-dimensional or negative boxes") {}
};
struct BadPolyDef : DGException {
BadPolyDef() : DGException("polygon must have at least three sides") {}
};
struct BadInputPoly : DGException {
BadInputPoly() : DGException("polydef input poly must have degree>0 and size>2") {}
};
#endif