element Class Referenceelement of the drawing more... Public Member FunctionsPublic AttributesDetailed DescriptionA single element of the drawing. Member Documentation int element::layerNum
layer of element The layer number of a element.
It has no function for cellRefs and CellRefsArrays. int element::datatype
datatype of element The datatype is a additional property of each element. bool element::select
select If set to true the whole element is selected. To select a single point use pSelect. void element::selectAll()
select all Selects this element completely. To select single points use pselect. void element::invertSelect()
invert select The selection of this element is inverted. void element::selectVisible()
select visible Selects this element if it is visible. void element::deselectAll()
deselect Deselect this element and all points of this element. void element::deleteSelect()
delete if selected Delete selected points of this element. void element::setDatatype(int t)
set datatype The datatype is set to t. int element::getDatatype()
get datatype The datatype is returned. void element::selectDatatype(int t)
select datatype If the datatype is t, the element is selected. void element::setDatatypeSelect(int t)
set datatype if selected The datatype is set to t, if the element is selected. pointArray element::getPoints()
get Point Returns:If it is a box: Returns an array of two points: first the top left corner, second the lower right corner.
If it is a polygon or path: Returns a array of all point of the element.
If it is a cellref: Returns an array of one point: the base point of the reference.
If it is a cellrefarray: Returns an array of tree points: first the base point of the reference, second base point plus space in x and third base point plus space in y.
If it is a text: Returns an array of one point: the base point of the text.
bool element::isBox()
test box Returns:true if element is a box otherwise false
bool element::isPolygon()
test polygon Returns:true if element is a polygon otherwise false
bool element::isCircle(point *, int *)
test circle Returns:true if element is a regular polygon with more than 8 points. The point is set to the center point and the integer is set to the radius.
bool element::isCircle()
test circle Returns:true if element is a regular polygon with more than 8 points
bool element::isCellref()
test cellRef Returns:true if element is a cellRef otherwise false
bool element::isCellrefArray()
test cellrefArray Returns:true if element is a cellRefArray otherwise false
cell* element::depend()
depend on Returns:in cellrefs and cellrefarrays a pointer to the refered cell is returned.
bool element::isText()
test text Returns:true if element is a text otherwise false
bool element::isPath()
test path Returns:true if element is a path otherwise false
void element::setWidth(int width)
set width Set the width for path and text-elements.
Parameters:width The height of a text-element/ width of a path is set to this value. Positive value result in a width in drawing-units. Negative value for size in pixel. | Set the width for path and text-elements. |
int element::getWidth()
get width Get the width for path and text-elements.
Returns:The height of a text-element/ width of a path. Positive value for a width in drawing-units. Negative value for size in pixel.
void element::setCap(int cap)
set cap Set the caps for path elements.
Parameters:cap | 0 for no caps, 1 for round caps, 2 for square caps. |
static double element::angle(point p1, point p2, point p3)
angle This function return the angle of line p1-p2 and p2-p3. static double element::angle(point p1, point p2)
angle This function return the angle of line p1-p2 to the xaxis. static double element::distance(point p1, point p2, point p3)
distance This function return the shortest distance of p3 to the line p1-p2 in databaseunits. static double element::distance(point p1, point p2)
distance This function return the distance between p1 and p2 in databaseunits. static int element::round(double d)
round This function rounds the double d. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |