Glade Reference


mpp class

The mpp class is derived from a shape. This class is normally created in a cellView using the dbCreateMPP() function.

 

mpp *m = mpp;

Creates a mpp.

 

m.addLayer(mppLayer l)

Adds a layer to the mpp.

 

mppLayer l  = mpp.getLayer(int idx)

Gets the mpp_layer by index. 

 

mppLayer *l = mpp.getLayers()

Gets the mpp_layers as an array for the mpp.

 

mpp.setLayers(mppLayer *l, int numLayers)

Sets the mpp layers.

 

int num = mpp.numLayers()

Get the number of mpp layers.

 

mpp.setNumLayers(int num)

Set the number of mpp layers.

 

mpp.setMppRule(mppRule *rule)

Set the mpp rule.

 

mppRule *rule = mpp.getMppRule()

Get the mpp_rule.

 

Rect b = m.bBox();

Get the bounding box of this mpp.

 

m.bBox(Rect b);

Set the bounding box of this mpp. Not useful and will throw an exception if called.

 

db_Type t = m.objType();

Returns the object type of this path as MPP.

 

char *name = m.objName();

Returns the object name of this path as "MPP".

 

int n = p.nPoints();

Returns the number of points of the path.

 

Point * pts = m.ptlist();

Returns the point list of this mpp as an array or Points.

 

m.bias(int bias, double grid);

Bias this mpp by bias, snapping to the grid grid.

 

m.scale(double scale, double grid);

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

 

int d = m.getNearestEdge(Point p, segment s);

Get the distance of the nearest segment s of this mpp to the point p;

 

int d = m.getNearestVertex(Point p, vertex s);

Get the distance of the nearest vertex s of this mpp to the point p;

 

m.transform(dbTransform trans);

Transform this mpp using trans.

 

bool m.ptInPoly(Point p)

Returns true if the Point p is contained in the mpp or on its edges.

 

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

Move this mpp by distance delta. If opt is True then the database is re-optimised for the new mpp 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 = m.Copy(cellView cv, Point delta);

Copy this mpp to cellView cv, with offset delta.

 

dbObj *obj = m.Flatten(cellView cv, dbTransform trans);

Flatten this mpp into cellView cv with transformation trans.

 

mpp.Stretch(Point delta, segment seg);

Stretch segment seg of this mpp by delta.

 

m.compressPoints();

Removes colinear points.

 

polygon q = m.shapeToPoly ();

Converts this mpp to polygons.

 

 

 

Contents|Index

Copyright © Peardrop Design 2016.