static sgCContour* sgCContour::CreateContour(sgCObject** objcts, int cnt)
Description:
Creates a contour by an array of line segments, arcs or other contours. The objects must topologically follow each other, i.e. the beginning of the next object must coincide with the end of the previous one.
Arguments:
objcts - array of the pointer to line segments, arcs or contours.
cnt - the number of objects in this array.
Returned value:
Returns the pointer to the created contour. Otherwise NULL.
Example (the contour of lines and another contour):
sgCObject* objcts[4];
objcts[0] = sgCreateLine(0.0, 0.0, 0.0, 2.0, 3.0, 5.0);
objcts[1] = sgCreateLine(2.0, 3.0, 5.0, 10.0, 0.0, 3.0);
objcts[2] = sgCreateLine(10.0, 0.0, 3.0, 6.0, 13.0, 15.0);
objcts[0] = sgCContour::CreateContour(&objcts[0],3);
objcts[1] = sgCreateLine(6.0, 13.0, 15.0, 20.0, 30.0, 75.0);
objcts[2] = sgCreateLine(20.0, 30.0, 75.0, 10.0, 6.0, -3.0);
objcts[3] = sgCreateLine(10.0, 6.0, -3.0, 0.0, 0.0, 0.0);
sgCContour* resCont = sgCContour::CreateContour(&objcts[0],4);
See also:
Objects hierarchy sgCObject methods