CwSetPosition

Syntax:

call CwSetPosition hObject, nX, nY, nWidth, nHeight, ,
                        nRotation, nShear

        hObject         (handle) An effect or group

        nX              (numeric) The X (horizontal) coordinate

        nY              (numeric) The Y (vertical) coordinate

        nWidth          (numeric) The width of the object

        nHeight         (numeric) The height of the object

        nRotation       (numeric) The angle of rotation of the object
                        (in degrees).

        nShear          (numeric) The angle of skew (0 to 80 degrees).

Description:

This procedure sets the location, size, rotation and shear angle of the specified object. The object is moved so that its center is at the point indicated by nX and nY. Both the location and dimensions of the object (i.e. width and height) are measured in the current unit. Rotation is measured in degrees as is shear. In the latter, the angle specified is that of the vertical bars of the rectangle containing the object.

Example:

/* Create a randomly-sized rectangle. */
x = random(1, 11)
y = random(1, 8)
w = random(1, 11)
h = random(1, 8)
rot = random(1, 360)
shear = random(1, 80)

o = CwCreateEffect("rectangle", "color fade")
call CwSetPosition o, x, y, w, h, rot, shear


Functions by NAME

Index

Functions by PURPOSE