the fair gds editor MacroClassPointArray

PointArray Class Reference

A array of points. More...

See also: point, List of Classes


Detailed Description

This class stores an array of points. The size of the array can be adjusted at runtime and has no limitation. It can be used to create paths, polygons or other shapes.

Example:

   1  pointArray pa=l->thisElement->getPoints();
   2  string sx,sy;
   3  for (i=0; i<pa.size(); i++){
   4         p=pa.point(i);
   5         sx.setNum(p.x());
   6         sy.setNum(p.y());
   7     }

See also: MacroClassPoint, MacroClassDrawingField

Member Function Documentation

pointArray::pointArray( )

Creates a empty array of points.

(introduced with version 20170316)

pointArray::pointArray(pointArray array)

Creates an array of points containing a copy of 'array'

(introduced with version 20170520)

pointArray::pointArray(int size)

Creates a array of points with a number of size points

(introduced with version 201760316)

void pointArray::addCornerArea(double value1,double value2,int angleInt=0)

Modifies a pointArray in the same way as cell::addCornerAreaSelect it does for selected polygons. (introduced with version 20130307)

void pointArray::attach(int x, int y)

Add a point with the cooridinates (x,y) to the end of the pointArray. The size of the array will be increased. (introduced with version 20130307)

void pointArray::attachPoint(point p)

Add the point p to the end of the pointArray. The size of the array will be increased.

point pointArray::centerOfGavity()

Returns: the center of gravity of the polygon (introduced with version 20170828)

void pointArray::chamfer(double value,int type,int angleInt=0)

Modifies a pointArray in the same way as cell::chamferSelect it does for selected polygons. (introduced with version 20130307)

void pointArray::filletBezier(double value,int type,int angleInt=0)

Modifies a pointArray in the same way as cell::filletBezierSelect it does for selected polygons. (introduced with version 20130307)

void pointArray::filletRound(double value,int type,int angleInt=0)

Modifies a pointArray in the same way as cell::filletRoundSelect it does for selected polygons. (introduced with version 20130307)

void pointArray::flip()

will flip the order of the point in the array. First point will get last point, etc.

void pointArray::insert(uint i, point p)

Inserts the point p at position i into the array. The size of the array will be increased.

point pointArray::point(int i)

Returns: the point at the position i

void pointArray::resize(int size)

Changed the size of the array. If size is bigger than the current size of the array, new points will be added to the end of the array. If it is smaller, points at the end will be deleted.

void pointArray::set(int i, int x, int y)

Changed the coordinates of the point at position i to the values x and y.

void pointArray::setPoint(int i,point p)

Sets the point p at the index of i.

int pointArray::size()

Returns: the size of the array

See also


CategoryMacroClass CategoryMacroClassBasic


MacroClassPointArray (last edited 2017-08-28 15:50:14 by JurgenThies)