version 1
CT GET AREA BOUNDARY (area; boundaryCode; left; top; right; bottom)
Parameter | Type | Description | |
area | Longint | 4D Chart area | |
boundaryCode | Integer | Boundary code | |
0 = Document boundary | |||
1 = Clipped boundary | |||
left | Real | Receives left boundary of area | |
top | Real | Receives top boundary of area | |
right | Real | Receives right boundary of area | |
bottom | Real | Receives bottom boundary of area |
Description
The CT GET AREA BOUNDARY command returns into the left, top, right, and bottom variables the coordinates of the area rectangle.
If boundaryCode is 0, CT GET AREA BOUNDARY returns the boundary for the whole document.
If boundaryCode is 1, CT GET AREA BOUNDARY returns the boundary for the 4D Chart area on a form or for the current size of the 4D Chart plug-in window
Example
This example creates a geometric object composed of several lines in an existing chart area, gets the area's boundary coordinates, and centers the object in the area.
For ($i;0;360;5) vLine:=CT Draw line (Area;50*Cos($i);50*Sin($i);0;0;0) End for CT GET AREA BOUNDARY (Area;1;$left;$top;$right;$bottom) CT MOVE (Area;-1;(($right-$left)/2)-50;(($bottom-$top)/2)-50)