version 6.0
DR ROTATE (area; scope; amount; mode)
| Parameter | Type | Description | |
| area | Longint | 4D Draw area | |
| scope | Longint | -1=All | |
| 0=Selected | |||
| >0=Object ID | |||
| amount | Integer | Amount of rotation in degrees | |
| mode | Integer | 0=Absolute | |
| 1=Relative |
Description
The command DR ROTATE rotates the objects in area described by scope.
If scope equals -1, DR ROTATE rotates all objects in the document.
If scope equals 0, DR ROTATE rotates the selected objects.
If scope is greater than 0, it must be equal to a specific object's ID and that object is rotated. If the object does not exist, DR Error returns error number 2.
The objects described by scope are rotated according to the amount and mode parameters.
You can specify amount as absolute or relative. If mode equals 0, amount is absolute and DR ROTATE rotates the object to an angle equal to amount degrees. If mode equals 1, amount is relative and DR ROTATE increases or decreases the object's rotation by amount.
A positive value for amount indicates a counter-clockwise rotation. A negative value for amount indicates clockwise rotation.
amount must be in the range ±359, or DR ROTATE does nothing, and DR Error returns error number 15.
Example
The following example is the object method for a button. It rotates all objects in the drawing back to 0°.
DR ROTATE (Area;-1;0;0)
See Also