version 6.0
DR POLYGON CURVE (area; x1; y1; x2; y2; targetX; targetY; mode)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| x1 | Number | X coordinate of control point 1 | |
| y1 | Number | Y coordinate of control point 1 | |
| x2 | Number | X coordinate of control point 2 | |
| y2 | Number | Y coordinate of control point 2 | |
| targetX | Number | X coordinate of ending point | |
| targetY | Number | Y coordinate of ending point | |
| mode | Integer | 0 = Absolute | |
| 1 = Relative |
Description
The command DR POLYGON CURVE allows you to draw a curve.
A line begins from the starting point as if it were heading for Control Point 1 (x1, y1).
A second line begins from the ending point and heads in the direction of Control Point 2 (x2,y2). The lines are curved so that they will intersect halfway between the starting point and the ending point.
Example
The following method creates a curved polygon using several straight lines and one curved line:
DR START POLYGON (MyArea) DR POLYGON LINE (MyArea;1;1;0) DR POLYGON LINE (MyArea;3;1;0) DR POLYGON LINE (MyArea;6;4;0) DR POLYGON LINE (MyArea;5;5;0) DR POLYGON CURVE (MyArea;6;2;2;6;2;3;0) DR POLYGON LINE (MyArea;1;1;0) $PolyID := DR End polygon (MyArea)
Point (3.5,4) is halfway between points (2,3) and (5,5), and is the point where the two curved lines meet.
See Also
DR End polygon, DR POLYGON LINE, DR START POLYGON.