ellipse class
An ellipse is represented by a centre point and an X and Y radius. An ellipse is derived from a shape. If X and Y are equal, you have a circle. An ellipse is normally created by the cellView::dbCreateEllipse() or cellView::dbCreateCircle() function.
int32_t ellipse::left()
Returns the least X value of the ellipse’s bounding box.
int32_t ellipse::right()
Returns the greatest X value of the ellipse’s bounding box.
int32_t ellipse::bottom()
Returns the lowest Y value of the ellipse’s bounding box.
int32_t ellipse::top()
Returns the highest Y value of the ellipse’s bounding box.
ellipse::setOrigin(const Point &origin)
ellipse::setOrigin(int32_t x, int32_t y)
Sets the ellipse’s centre point.
Point ellipse::origin()
Returns the ellipse’s centre point.
int32_t ellipse::height()
Returns the height of the ellipse.
int32_t ellipse::width()
Returns the width of the ellipse.
Rect ellipse::bBox()
Returns the ellipse’s bounding box.
ellipse::setXRadius(int32_t r)
Set the X radius of the ellipse
ellipse::setYRadius(int32_t r)
Set the Y radius of the ellipse.
int32_t ellipse::xRadius()
Returns the X radius of the ellipse.
int32_t ellipse::yRadius()
Returns the Y radius of the ellipse.
ellipse::setNumChords(int32_t n)
Sets the number of edges that the ellipse will be fractured into when converting to a polygon.
int32_t ellipse::numChords()
Get the number of edges for the ellipse.
dbtype_t ellipse::objType()
Returns the object’s type as ELLIPSE
const char * ellipse::objName()
Returns the object’s name as “ELLIPSE”
float64_t ellipse::area()
Returns the ellipse’s area.
int32_t ellipse::perimeter()
Returns the ellipse’s perimeter.
bool ellipse::offGrid(int32_t grid)
Returns true if the ellipse’s xRadius or yRadius is offgrid.
ellipse::transform(transform trans)
Transforms the ellipse by trans.
ellipse::Move(cellView *dest, Point delta, bool opt=true)
Move this ellipse by distance delta. If opt is True then the database is re-optimised for the new rectangle position. If there are a lot of objects to move it makes sense to turn this off and instead use the cellView update() function after moving them all.
dbObj * ellipse::Copy(cellView *dest, Point delta, layer=-1)
Copy this ellipse to cellView dest, with offset delta. If layer is non negative the rectangle will be copied to the new layer number.
dbObjList<dbObj> * ellipse::Flatten(cellView *dest, transform trans, bool hier=true)
Flatten this ellipse into cellView dest with transformation trans.
ellipse::bias(int32_t bias, int32_t xgrid, int32_t ygrid, int16_t layer=-1)
Bias this ellipse by bias, snapping to the grid xgrid and ygrid.
ellipse::scale(float64_t scale, int32_t grid)
Scale this ellipse by scale, snapping to the grid grid.