![]() | Macro Programming | ![]() |
#include <element.h>
Public Member Functions | |
void | deleteSelect () |
delete if selected | |
cell * | depend () |
depend on | |
void | deselectAll () |
deselect | |
int | getDatatype () |
get datatype | |
pointArray | getPoints () |
get Point | |
int | getWidth () |
get width | |
void | invertSelect () |
invert select | |
bool | isBox () |
test box | |
bool | isCellref () |
test cellRef | |
bool | isCellrefArray () |
test cellrefArray | |
bool | isCircle () |
test circle | |
bool | isCircle (point *, int *) |
test circle | |
bool | isPath () |
test path | |
bool | isPolygon () |
test polygon | |
bool | isText () |
test text | |
void | selectAll () |
select all | |
void | selectDatatype (int t) |
select datatype | |
void | selectVisible () |
select visible | |
void | setCap (int cap) |
set cap | |
void | setDatatype (int t) |
set datatype | |
void | setDatatypeSelect (int t) |
set datatype if selected | |
void | setWidth (int width) |
set width | |
Static Public Member Functions | |
static double | angle (point p1, point p2) |
angle | |
static double | angle (point p1, point p2, point p3) |
angle | |
static double | distance (point p1, point p2) |
distance | |
static double | distance (point p1, point p2, point p3) |
distance | |
static int | round (double d) |
round | |
Public Attributes | |
int | datatype |
datatype of element | |
int | layerNum |
layer of element | |
bool | select |
select |
A single element of the drawing.
angle
This function return the angle of line p1-p2 to the xaxis.
angle
This function return the angle of line p1-p2 and p2-p3.
void element::deleteSelect | ( | ) |
delete if selected
Delete selected points of this element.
cell* element::depend | ( | ) |
depend on
void element::deselectAll | ( | ) |
deselect
Deselect this element and all points of this element.
distance
This function return the distance between p1 and p2 in databaseunits.
distance
This function return the shortest distance of p3 to the line p1-p2 in databaseunits.
int element::getDatatype | ( | ) |
get datatype
The datatype is returned.
pointArray element::getPoints | ( | ) |
get Point
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.
int element::getWidth | ( | ) |
get width
Get the width for path and text-elements.
void element::invertSelect | ( | ) |
invert select
The selection of this element is inverted.
bool element::isBox | ( | ) |
test box
bool element::isCellref | ( | ) |
test cellRef
bool element::isCellrefArray | ( | ) |
test cellrefArray
bool element::isCircle | ( | ) |
test circle
bool element::isCircle | ( | point * | , | |
int * | ||||
) |
test circle
bool element::isPath | ( | ) |
test path
bool element::isPolygon | ( | ) |
test polygon
bool element::isText | ( | ) |
test text
static int element::round | ( | double | d | ) | [static] |
round
This function rounds the double d.
void element::selectAll | ( | ) |
select all
Selects this element completely. To select single points use pselect.
void element::selectDatatype | ( | int | t | ) |
select datatype
If the datatype is t, the element is selected.
void element::selectVisible | ( | ) |
select visible
Selects this element if it is visible.
void element::setCap | ( | int | cap | ) |
set cap
Set the caps for path elements.
cap | 0 for no caps, 1 for round caps, 2 for square caps. |
void element::setDatatype | ( | int | t | ) |
set datatype
The datatype is set to t.
void element::setDatatypeSelect | ( | int | t | ) |
set datatype if selected
The datatype is set to t, if the element is selected.
void element::setWidth | ( | int | width | ) |
set width
Set the width for path and text-elements.
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. |
datatype of element
The datatype is a additional property of each element.
layer of element
The layer number of a element. It has no function for cellRefs and CellRefsArrays.
bool element::select |
select
If set to true the whole element is selected. To select a single point use pSelect.