An array of points to store polygon or path data. More...
pointArray( ) | |
pointArray(pointArray array) | |
pointArray(int size) | |
void | addCornerArea(double value1,double value2,int angleInt=0) |
void | attach(int x, int y) |
void | attachPoint(point p) |
pointArray | BSpline() |
point | center() |
point | centerOfGravity() |
void | chamfer(double value,int type,int angleInt=0) |
void | filletBezier(double value,int type,int angleInt=0) |
void | filletRound(double value,int type,int angleInt=0) |
void | flip() |
void | insert(uint i, point p) |
point | maximum() |
point | minimum() |
point | point(int i) |
void | resize(int size) |
void | set(int i, int x, int y) |
void | setPoint(int i,point p) |
int | size() |
This class stores an array of class point. 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:
pointArray pa=l->thisElement->getPoints();
string sx,sy;
for (i=0; i<pa.size(); i++){
p=pa.point(i);
sx.setNum(p.x());
sy.setNum(p.y());
}
See also: class point, class drawingField
Creates an empty array of points.
Creates an array of points containing a copy of array
Creates a array of points with the given size.
Modifies a pointArray in the same way as cell::addCornerAreaSelect it does for selected polygons.
Add a point with the cooridinates (x,y) to the end of the pointArray. The size of the array will be increased.
Add the point p to the end of the pointArray. The size of the array will be increased.
a B-Spline is created and returned, if the first point is identical with the last point a closed B-Spline is assumed. (introduced with release 20190202)
Returns: the center of of the bounding box of the polygon (introduced with release 20180623)
Returns: the center of gravity of the polygon
Modifies a pointArray in the same way as cell::chamferSelect it does for selected polygons.
Modifies a pointArray in the same way as cell::filletBezierSelect it does for selected polygons.
Modifies a pointArray in the same way as cell::filletRoundSelect it does for selected polygons.
will flip the order of the point in the array. First point will get last point, etc.
Inserts the point p at position i into the array. The size of the array will be increased.
Returns: the upper right corner of the bounding box of the polygon (introduced with release 20180623)
Returns: the lower left corner of the bounding box of the polygon (introduced with release 20180623)
Returns: the point at the position i
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.
Changed the coordinates of the point at position i to the values x and y.
Sets the point p at the index of i.
Returns: the size of the array