Glade Reference


label class

The label class is derived from a shape. This class is normally created in a cellView using the dbCreateLabel function.

 

const char * label::theLabel()

Gets the label name

 

label::theLabel(char *name)

Sets the label name.

 

float64_t label::height()

Gets the label's height attribute

 

label::height(float64_t h)

Sets the label's height

 

float64_t w = label::width()

Gets the label's width

 

label::width(float64_t w)

Sets the label's width. This is not used.

 

db_Orient o =label::orient()

Gets the label orientation.

 

label::orient(db_Orient o)

Sets the label orientation

 

Point label::origin()

Gets the label's origin

 

label::origin(int32_t x, int32_t y)

Sets the label's origin

 

label::origin(Point p)

Sets the label's origin

 

label::setType(db_labelType t)

Sets the label type. The type can be one of normal, cdlLabel, or pyLabel

 

db_LabelType label::type()

Gets the label type.

 

db_TextAlign label::align()

Gets the label's alignment.

 

label::align(db_TextAlign a)

Sets the label's alignment.

 

label::overline(bool b)

Sets the label's overline flag.

 

bool label::overline()

Gets the label's overline flag.

 

label::underline(bool b)

Sets the label's underline flag.

 

bool label::underline()

Gets the label's underline flag.

 

label::strikethru(bool b)

Sets the label's strikethru flag.

 

bool label::strikethru()

Gets the label's strikethru flag.

 

label::flags(uint16_t flags)

Sets the label's flag bits.

 

uint16_t label::flags()

Gets the label's flag bits.

 

Rect label::bBox()

Gets the bounding box of the label. Note that as a label does not have a 'real' bounding box - the box is approximately the size of the displayed text of the label, in database units.

 

label::bBox(Rect box)

Sets the label's bounding box. This is not used and will throw an exception if called.

 

label::objType()

Get the object type (TEXT)

 

const char * label::objName()

Gets the object name ("LABEL")

 

int32_t label::getNearestEdge(const Point &p, segment &edge)

Gets the nearest edge of the label's bounding box to a Point p. The function returns the distance to the edge.

 

label::transform(transform trans)

Transform a label by some transform trans.

 

bool label::ptInPoly(const Point &p)

Returns true if the Point p is within the label's display bBox.

 

label::Move(cellView *cv, Point delta, bool opt = true)

Moves a label by distance delta. If opt is true then the database is re-optimised for the new label 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 = label::Copy(cellView *cv, Point delta, int16_t layer=-1)

Copy the label to cellView cv, with offset delta. If layer is non-negative the label will be copied to the new layer.

 

dbObj *obj = label::Flatten(cellView *cv, transform trans)

>Flatten the label into cellView cv with some transform trans.

 

label::bias(int32_t bias, float64_t grid)

Bias the label. As the label is really just a point, this does nothing useful.

 

label::scale(float64_t scale, float64_t grid)

Scale the label. The label’s origin is scaled by the value scale.

 

bool label::operator ==

Returns true if the label’s origin is equal to the other label’s.

 

bool label::operator !=

Returns true if the label’s origin is not equal to the other label’s.

 

bool label::operator <

Returns true if the label’s origin is less than the other label’s.

 

 

Contents|Index

Copyright © Peardrop Design 2024.