Glade Reference


Vertex

A vertex is a point. It is derived from a dbObj so it can be selectable; it also refers to a dbObj. Vertices are used when selecting a vertex of e.g. a rectangle or polygon.

vert = vertex(Point p)

Creates a vertex with coordinate p.

 

vert = vertex(int x, int y)

Creates a vertex with the specified xy coordinates.

 

db_Type vert.objType()

Returns the objects type - VERTEX.

 

char * vert.objName()

Returns the print name i.e. "VERTEX"

 

operator ==

Is one vertex equal to another.

 

operator !=

Is one vertex different from the other.

 

vert.SetObj(dbObj *obj)

Sets the dbObj associated with this vertex.

 

dbObj * vert.GetObj()

Gets the dbObj associated with this vertex.

 

Rect vert.bBox()

Returns a fake bounding box 10 dbu larger than the vertex itself.

 

vert.transform(transform trans)

Transforms this vertex according to trans.

 

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

Moves this vertex by delta.  If opt is True then the database is re-optimised for the new vertex 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  *newVert =  vert.Copy(cellView *from, Point delta)

Copies the vertex. cv is the cellView containing the vertex, delta is the XY coordinate to move the vertex by during the copy.

 

vert.transform(transform trans);

Transforms the vertex by the transform trans.

 

int vert.x()

The x coordinate of the vertex.

 

int vert.y()

The y coordinate of the vertex.

 

vert.setX(int x)

Set the X coordinate of the vertex.

 

vert.setY(int y)

Set the Y coordinate of the vertex.

 

 

Contents|Index

Copyright © Peardrop Design 2020.