Glade Reference


ellipse class

An ellipse is represented by a centre point and an X and Y radius. If X and Y are equal, you have a circle. An ellipse is normally created by the cellView::dbCreateEllipse() or cellView::dbCreateCircle() function.

int x = e.left()


Returns the least X value of the ellipse’s bounding box.

 

int x = e.right()


Returns the greatest X value of the ellipse’s bounding box.

 

int e.bottom()


Returns the lowest Y value of the ellipse’s bounding box.

 

int e.top()


Returns the highest Y value of the ellipse’s bounding box.

 

e.setOrigin(Point origin)
e.setOrigin(int x, int y)


Sets the ellipse’s centre point.

 

int origin = e.origin()


Returns the ellipse’s centre point.

 

int h = e.height()


Returns the height of the ellipse.

 

int w = e.width()


Returns the width of the ellipse.

 

Rect e.bBox()


Returns the ellipse’s bounding box.

 

e.setXRadius(int r)


Set the X radius of the ellipse

 

e.setYRadius(int r)


Set the Y radius of the ellipse.

 

int r = e.xRadius()


Returns the X radius of the ellipse.

 

int r = e. yRadius()


Returns the Y radius of the ellipse.

 

e.setNumChords(int n)


Sets the number of edges that the ellipse will be fractured into when converting to a polygon.

 

int n = e.numChords()


Get the number of edges for the ellipse.

 

dbtype_t type = e.objType()


Returns the object’s type as ELLIPSE

 

const char *name = e.objName()


Returns the object’s name as “ELLIPSE”

 

double a = e.area()


Returns the ellipse’s area.

int p = e.perimeter()


Returns the ellipse’s perimeter.

 

bool ok = e.offGrid(int grid)


Returns true if the ellipse’s xRadius or yRadius is offgrid.

 

e.transform(transform trans)


Transforms the ellipse by trans.

 

e.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 *obj = e.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> *objs = e.Flatten(cellView *dest, transform trans, bool hier=True)


Flatten this ellipse into cellView dest with transformation trans.

 

e.bias(int bias, int xgrid, int ygrid, int layer=-1)


Bias this ellipse by bias, snapping to the grid xgrid and ygrid.

 

e.scale(double scale, int grid)

Scale this ellipse by scale, snapping to the grid grid.

 

Contents|Index

Copyright © Peardrop Design 2020.