logo

Macro Programming

logo
Contents

element Class Reference

element of the drawing More...

#include <element.h>

List of all members.


Public Member Functions

void deleteSelect ()
 delete if selected
celldepend ()
 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

Detailed Description

element of the drawing

A single element of the drawing.


Member Function Documentation

static double element::angle ( point  p1,
point  p2 
) [static]

angle

This function return the angle of line p1-p2 to the xaxis.

static double element::angle ( point  p1,
point  p2,
point  p3 
) [static]

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

Returns:
in cellrefs and cellrefarrays a pointer to the refered cell is returned.

void element::deselectAll (  ) 

deselect

Deselect this element and all points of this element.

static double element::distance ( point  p1,
point  p2 
) [static]

distance

This function return the distance between p1 and p2 in databaseunits.

static double element::distance ( point  p1,
point  p2,
point  p3 
) [static]

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

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.

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::invertSelect (  ) 

invert select

The selection of this element is inverted.

bool element::isBox (  ) 

test box

Returns:
true if element is a box otherwise false

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

bool element::isCircle (  ) 

test circle

Returns:
true if element is a regular polygon with more than 8 points

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::isPath (  ) 

test path

Returns:
true if element is a path otherwise false

bool element::isPolygon (  ) 

test polygon

Returns:
true if element is a polygon otherwise false

bool element::isText (  ) 

test text

Returns:
true if element is a text otherwise false

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.

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

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.


Member Data Documentation

int element::datatype

datatype of element

The datatype is a additional property of each element.

int element::layerNum

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.


Contents
SourceForge.net Logo