version 6.0
DR SIZE (area; scope; anchorH; anchorV; width; height; mode)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1=All | |
| 0=Selected | |||
| >0=Object ID | |||
| anchorH | Integer | 0=None | |
| 1=Left | |||
| 2=Middle | |||
| 3=Right | |||
| anchorV | Integer | 0=None | |
| 1=Top | |||
| 2=Middle | |||
| 3=Bottom | |||
| width | Number | Width | |
| height | Number | Height | |
| mode | Number | 0=Absolute | |
| 1=Relative |
Description
The command DR SIZE resizes the objects described in area by scope.
If scope equals -1, the command resizes all objects in the document.
If scope equals 0, the command resizes the selected objects.
If scope is greater than 0, it must be equal to a specific object's ID; the command resizes that object. If the object does not exist, DR Error returns error number 2.
anchorH and anchorV indicate which side of an object is anchored when it is resized.
If anchorH equals 0, the width of the object does not change and DR SIZE ignores any value for width.
If anchorH equals 1, the command anchors the left side of the object.
If anchorH equals 2, the command anchors the center of the object.
If anchorH equals 3, the command anchors the right side of the object.
As with anchorH, if anchorV equals 0, the height of the object does not change and DR SIZE ignores any value for height.
If anchorV equals 1, DR SIZE anchors the top of the object.
If anchorV equals 2, the command anchors the center of the object.
If anchorV equals 3, the command anchors the bottom of the object.
DR SIZE resizes the objects described by scope according to the width, height, and mode parameters. You can specify width and height as absolute or relative.
If mode equals 0, width and height are absolute and DR SIZE makes the object width wide and height tall.
If mode equals 1, width and height are relative and the command increases or decrease object size by width and height.
Positive values indicate a direction down or right. Negative values indicate a direction up or left. Both width and height are expressed in base units. Use the DR Scale to base function to convert from scale units to base units.
Example
The following example adds one unit of height and width to the object with ID equal to 5 using the center of the object as the anchor.
DR SIZE (Area;5;2;2;1;1;1)
See Also