Glade Reference


mpp class

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

 

mppLayer class

A mppLayer is a helper class to hold information about each layer that comprises a mpp. It has the following accessor fuctions:

      class mppLayer {
        setWidth(int32_t w);
        int32_t width(void) const;
        setLength(int32_t l);
        int32_t length(void) const;
        setSpace(int32_t s);
        int32_t space(void) const;
        setBegExt(int32_t e);
        int32_t begExt(void) const;
        setEndExt(int32_t e);
        int32_t endExt(void) const;
        setLayer(int16_t l);
        int16_t layer(void) const;
        int32_t offset(void) const;
        setOffset(int32_t offset);
      }
    

mpp::addLayer(mppLayer l)

Adds a layer to the mpp.

 

mppLayer getLayer(int32_t idx)

Gets the mpp_layer by index.

 

mppLayer * mpp::getLayers()

Gets the mppLayer’s as an array for the mpp.

 

mpp::setLayers(mppLayer * l, int32_t numLayers)

Sets the mpp layers.

 

int32_t mpp::numLayers()

Get the number of mpp layers.

 

mpp::setNumLayers(int32_t num)

Set the number of mpp layers.

 

mppRule class

A mppRule is a heper struct to hold mpp rules.

      struct mppRule {
        char              * name;
        uint32_t            numLayers;
        cdb::mppLayer     * layers;
        int32_t             maxWidth;
      }
    

mpp::setMppRule(mppRule *rule)

Set the mpp rule.

 

mppRule *rule = mpp::getMppRule()

Get the mpp_rule.

 

Rect mpp::bBox();

Get the bounding box of this mpp.

 

mpp::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.

 

const char *name = m.objName();

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

 

int32_t mpp::nPoints();

Returns the number of points of the mpp.

 

Point * mpp::ptlist();

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

 

mpp::bias(int32_t bias, float64_t grid);

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

 

mpp::scale(float64_t scale, float64_t grid);

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

 

int32_t mpp::getNearestEdge(const Point &p, segment &s);

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

 

int32_t mpp::getNearestVertex(const Point &p, vertex &v);

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

 

mpp::transform(transform trans);

Transform this mpp using trans.

 

bool mpp::ptInPoly(Point p)

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

 

mpp::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 * mpp::Copy(cellView *cv, Point delta);

Copy this mpp to cellView cv, with offset delta.

 

dbObj * mpp::Flatten(cellView *cv, transform trans);

Flatten this mpp into cellView cv with transformation trans.

 

mpp::Stretch(Point delta, segment seg);

Stretch segment seg of this mpp by delta.

 

mpp::compressPoints();

Removes colinear points.

 

polygon * mpp::shapeToPoly ();

Converts this mpp to polygons.

 

 

Contents|Index

Copyright © Peardrop Design 2024.