Glade Reference


group

A group is an object derived from a dbObj that groups together other dbObj (including other groups). This allows groups of objects to be manipulated together, e.g. move, copy, rotate operations can be carried out as if the group is an instance.

groups can be transparent; a transparent group can have its individual members edited, whereas a non-transparent group can only have its shape manipulated (which is a rectangle on the group layer, with size equal to the bounding box of all the members).

 

Creating groups

groups are normally created using the cellView dbCreategroup() function.

 

db_Type type = grp.objType()

Get the type of the object as group.

 

const char * s = grp.objName()

Get the print name of the object, as "group".

 

grp.setName(const char *name)

Sets the name of the group

 

const char * s = grp.name()

Gets the group's name.

 

const Rect r = grp.bBox()

Gets the group's bounding box.

 

int xlo = grp.left()

Gets the left edge / minimum X coord of the group bBox

 

int ylo = grp.bottom()

Gets the bottom edge / minimum Y coord of the group bBox

 

nt xhi= grp.right()

Gets the right edge / maximum X coord of the group bBox

 

int yhi = grp.top()

Gets the top edge / maximum Y coord of the group bBox

 

grp.orient(orient_t o)

Sets the orientation of the group.

 

orient_t o = grp.orient()

Gets the orientation of the group.

 

grp.origin(const Point &p)

Sets the origin (lower left coordinate) of the group.

 

Point &p = grp.origin()

Gets the origin of the group.

 

grp.addObject(dbObj *obj)

Adds an object obj to the group. If the object is already a member of the group, it will not be added. The group's bounding box is adjusted accordingly.

 

grp.deleteObj(dbObj *obj)

Removes an object obj from the group. The group's bounding box is adjusted accordingly.

 

int num = grp.size()

Returns the size (number of objects in the group).

 

std::vector<dbObj *> &grp.members()

Returns a list of the group's members.

 

grp.clear()

Removes all members of the group. The group is NOT deleted.

 

bool b = grp.member(dbObj *obj)

Returns true if obj is a member of the group.

 

bool grp.ptInPoly(const Point &p)

Returns true if the point p is inside the group's bounding box.

 

grp.Move(cellView *cv, Point delta, bool opt=True)

Moves the group (of the cellView cv) and all its members by delta. If opt is True, the spatial trees are reoptimised. If many groups are to be moved, it is faster to set opt to false and make a single call to cv.optimise() after.

 

dbObj *copy = grp.Copy(cellView *cv, Point delta)

Copies the group and all its members, displacing it by delta in the cellView cv.

 

grp.transform(transform &trans)

Transforms the group and all its members by trans.

 

int layer = grp.layer()

Returns the group's layer id, TECH_FIGGROUP_LAYER.

 

 

 

Contents|Index

Copyright © Peardrop Design 2020.