DR ROTATE

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR ROTATE (area; scope; amount; mode)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Object ID
amountIntegerAmount of rotation in degrees
modeInteger0=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

DR Get ID, DR Get rotation.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next