DR SCALE

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 SCALE (area; scope; anchorH; anchorV; amountH; amountV)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Object ID
anchorHInteger0=None
1=Left
2=Middle
3=Right
anchorVInteger0=None
1=Top
2=Middle
3=Bottom
amountHNumberHorizontal multiplier
amountVNumberVertical multiplier

Description

The command DR SCALE scales the objects described by scope in area.

If scope equals -1, DR SCALE scales all objects in the document.

If scope equals 0, DR SCALE scales the selected objects.

If scope is greater than 0, it must be equal to a specific object's ID; DR SCALE scales 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 scaled.

If anchorH equals 0, the width of the object does not change and DR SCALE ignores any value for amountH.

If anchorH equals 1, DR SCALE 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 SCALE ignores any value for amountV.

If anchorV equals 1, DR SCALE 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 SCALE scales objects described by scope according to the amountH and amountV parameters.

If amountH and amountV are greater than 1, DR SCALE increases object size.

If amountH and amountV are less than 1, DR SCALE decreases object size.

The new width of the object is equal to its current width, multiplied by amountH. The new height is similarly derived, using amountV.

Example

The following examples are object methods for two different buttons named bDouble and bHalf. The first button doubles the size of the selected object, and the second cuts the object's size in half.

   DR SCALE (Area;0;2;2;2;2)   `bDouble
   DR SCALE (Area;0;2;2;0.5;0.5)   `bHalf

See Also

DR Get ID, DR MOVE, DR SIZE.


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