DAStatics Functions Relevant to DATransform2 Objects

Compose2 Creates a two-dimensional transformation behavior that is a composition of the given transformation behaviors.
Compose2Array Creates a two-dimensional transformation behavior that is a composition of the DATransform2 objects included in the array.
FollowPath Creates a DATransform2 object that is a translation (from the origin) that follows a 2-D vector drawing path.
FollowPathAngle Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position.
FollowPathAngleEval Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position.
FollowPathAngleUpright Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position.
FollowPathAngleUprightEval Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position.
FollowPathEval Creates a DATransform2 object that is a translation (from the origin) that follows a 2-D vector drawing path.
Rotate2 Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians). Same as Rotate2Anim except radians is a nonanimated number (a double).
Rotate2Anim Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians).
Rotate2Degrees Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees).
Rotate2Rate Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians).
Rotate2RateDegrees Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees).
Scale2 Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it. Same as Scale2Anim except the parameters are nonanimated numbers (double values).
Scale2Anim Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it.
Scale2Rate Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it.
Scale2Uniform Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object. Same as Scale2UniformAnim except uniformFactor is a nonanimated number (a double).
Scale2UniformAnim Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object.
Scale2UniformRate Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object.
Scale2Vector Creates a two-dimensional transformation that, when applied to any two-dimensional vector, scales it.
Transform3x2Anim Creates a two-dimensional transformation that consists of a 3 by 2 matrix (array) having the values specified by the given animated numbers.
Translate2 Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the specified amount. Same as Translate2Anim except tx and ty are nonanimated numbers (doubles).
Translate2Anim Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the amount given by the animated numbers.
Translate2Point Creates a two-dimensional transformation that, when applied to a point, translates (moves) the point to the new location loc.
Translate2Rate Creates a two-dimensional transformation that, when applied to a point, translates (moves) the point by the amount given by the arguments.
Translate2Vector Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the amount given by the vector.
XShear2 Creates a two-dimensional transformation that shears the x-axis either up or down. Same as XShear2Anim except that a is a nonanimated number (a double).
XShear2Anim Creates a two-dimensional transformation that shears the x-axis either up or down.
XShear2Rate Creates a two-dimensional transformation that shears the x-axis either up or down.
YShear2 Creates a two-dimensional transformation that shears the y-axis either left or right. Same as YShear2Anim except that a is a nonanimated number (a double).
YShear2Anim Creates a two-dimensional transformation that shears the y-axis either left or right.
YShear2Rate Creates a two-dimensional transformation that shears the y-axis either left or right.

Compose2

DAStatics Class

Creates a two-dimensional transformation behavior that is a composition of the given transformation behaviors.

Syntax

lib.Compose2( xf1, xf2 )

Parameters

xf1 and xf2
DATransform2 objects used in the composition.

Return Value

Returns the DATransform2 object.

Remarks

Composing a transform is equivalent to first applying xf2 and then applying xf1.

Compose2Array

DAStatics Class

Creates a two-dimensional transformation behavior that is a composition of the DATransform2 objects included in the array.

Syntax

lib.Compose2Array( xforms )

Parameters

xforms
DATransform2 objects included in the (variant) array.

Return Value

Returns the DATransform2 object.

Remarks

Composing a transform is equivalent to first applying xfn, then applying xfn -1 and so on.

FollowPath

DAStatics Class

Creates a DATransform2 object that is a translation (from the origin) that follows a 2-D vector drawing path. The DAPath2 object is converted into the equivalent translation transform.

Syntax

lib.FollowPath( path, duration )

Parameters

path
DAPath2 object that will be traced.
duration
A double value representing the amount of time (in seconds) it will take to go from the beginning of the path to the end.

Return Value

Returns the DATransform2 object.

FollowPathAngle

DAStatics Class

Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative.

Syntax

lib.FollowPathAngle( path, duration )

Parameters

path
DAPath2 object which is traversed.
duration
A double value representing the amount of time (in seconds) it will take to go from the beginning of the path to the end.

Return Value

Returns the DATransform2 object.

FollowPathAngleEval

DAStatics Class

Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative.

Syntax

lib.FollowPathAngleEval( path, evaluator )

Parameters

path
DAPath2 object which is traversed.
evaluator
DANumber object representing a value in the range [0, 1]. This value is a position on the path, where 0 is the beginning of the path and 1 is the end. This must be an animated number.

Return Value

Returns the DATransform2 object.

FollowPathAngleUpright

DAStatics Class

Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative, except that the angle that is perpendicular to the X-axis (in local coordinates) will always be less than 180 degrees.

Syntax

lib.FollowPathAngleUpright( path, duration )

Parameters

path
DAPath2 object which will be traversed.
duration
A double representing the amount of time (in seconds) it will take to go from the beginning of the path to the end.

Return Value

Returns the DATransform2 object.

FollowPathAngleUprightEval

DAStatics Class

Creates a DATransform2 object that is equal to the angle of the path's tangent while it is being traversed, translated by its position. This is equivalent to rotating the position by its derivative, except that the angle that is perpendicular to the X-axis (in local coordinates) will always be less than 180 degrees.

Syntax

lib.FollowPathAngleUprightEval( path, evaluator )

Parameters

path
DAPath2 object which will be traversed.
evaluator
DANumber object representing a value in the range [0, 1]. This value is a position on the path, where 0 is the beginning of the path and 1 is the end. This must be an animated number.

Return Value

Returns the DATransform2 object.

FollowPathEval

DAStatics Class

Creates a DATransform2 object that is a translation (from the origin) that follows a 2-D vector drawing path. The DAPath2 object is converted into the equivalent translation transform.

Syntax

lib.FollowPathEval( path, evaluator )

Parameters

path
DAPath2 object that will be traced.
evaluator
DANumber object representing a value in the range [0, 1]. This value is a position on the path, where 0 is the beginning of the path and 1 is the end. This must be an animated number.

Return Value

Returns the DATransform2 object.

Rotate2

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians). Same as Rotate2Anim except radians is a nonanimated number (a double).

Syntax

lib.Rotate2( radians )

Parameters

radians
A double value representing the angle of rotation. This is a nonanimated number.

Return Value

Returns the DATransform2 object.

Remarks

Rotations are counterclockwise.

Rotate2Anim

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians).

Syntax

lib.Rotate2Anim( radians )

Parameters

radians
DANumber object (animated number) representing the angle of rotation.

Return Value

Returns the DATransform2 object.

Remarks

Rotations are counterclockwise.

Rotate2Degrees

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees).

Syntax

lib.Rotate2Degrees( degrees )

Parameters

degrees
Number (a double) representing the angle of rotation (expressed in degrees).

Return Value

Returns the DATransform2 object.

Remarks

Rotations are counterclockwise.

Rotate2Rate

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in radians). This value is multiplied by LocalTime to determine the rotation rate.

Syntax

lib.Rotate2Rate( radians )

Parameters

radians
Number (a double) representing the angle of rotation, multiplied by LocalTime. The unit is radians per second.

Return Value

Returns the DATransform2 object.

Remarks

Rotations are counterclockwise.

Rotate2RateDegrees

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, rotates it by the given angle (expressed in degrees). This value is multiplied by LocalTime to determine the rotation rate.

Syntax

lib.Rotate2RateDegrees( degrees )

Parameters

degrees
Number (a double) representing the angle of rotation, expressed in degrees, multiplied by LocalTime. The unit is degrees per second.

Return Value

Returns the DATransform2 object.

Remarks

Rotations are counterclockwise.

Scale2

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it. Same as Scale2Anim except the parameters are nonanimated numbers (double values).

Syntax

lib.Scale2( sx, sy )

Parameters

sx and sy
Values representing the amount to scale. The value of sx applies to the x-coordinate, and sy to the y-coordinate. These are nonanimated numbers (double values).

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Scale2Anim

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it. For example, the transformation modifies the length of a vector by multiplying the vector's coordinates by the values of the corresponding number behaviors.

Syntax

lib.Scale2Anim( sx, sy )

Parameters

sx and sy
DANumber objects representing the amount to scale. The value of sx applies to the x-coordinate, and sy to the y-coordinate. These must be animated numbers.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Scale2Rate

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to any two-dimensional object, scales it. The scaling rates are determined by multiplying each argument by LocalTime.

Syntax

lib.Scale2Rate( x, y )

Parameters

sx and sy
Numbers (doubles) representing the amounts to scale, multiplied by LocalTime. The value of sx applies to the x coordinate, and sy to the y coordinate.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters per second or pixels per second, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Scale2Uniform

DAStatics Class

Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object. Same as Scale2UniformAnim except uniformFactor is a nonanimated number (a double).

Syntax

lib.Scale2Uniform( uniformFactor )

Parameters

uniformFactor
A double value representing the value to apply to both the x- and y-coordinates, respectively. These is a nonanimated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Scale2UniformAnim

DAStatics Class

Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object.

Syntax

lib.Scale2UniformAnim( uniformFactor )

Parameters

uniformFactor
DANumber object representing the value to apply to both the x- and y-coordinates, respectively. This must be an animated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

See Also

Scale2Anim

Scale2UniformRate

DAStatics Class

Creates a two-dimensional transformation that applies a uniform scale to every coordinate of a two-dimensional object. The scaling rate is determined by multiplying the argument by LocalTime.

Syntax

lib.Scale2UniformRate( rate )

Parameters

rate
Value to apply to both the x- and y-coordinates, respectively, multiplied by LocalTime.

Return Value

Returns a DATransform2 object representing the newly created transformation.

Remarks

The units can either be meters per second or pixels per second, depending on whether the MeterLibrary or the PixelLibrary is selected.

Scale2Vector

DAStatics Class

Creates a two-dimensional transformation that, when applied to any two-dimensional vector, scales it. For example, the transformation modifies the location of a point by multiplying the point's coordinates by the values of the corresponding vector coordinates.

Syntax

lib.Scale2Vector( v )

Parameters

v
DAVector2 object. The x and y coordinates of the vector specify the amounts to scale the x and y coordinates, respectively.

Return Value

Returns the DATransform2 object.

Transform3x2Anim

DAStatics Class

Creates a two-dimensional transformation that consists of a 3 by 2 matrix (array) having the values specified by the given animated numbers.

Syntax

lib.Transform3x2Anim( matrix )

Parameters

matrix
A 3 by 2 matrix. The top row of the matrix could be represented as containing DANumber objects a00, a01, and a02. Use a00 to scale the x coordinate and a02 to translate x.
The bottom row of the matrix could be represented as containing the DANumber objects a10, a11, and a12. Use a11 to scale the y coordinate and a12 to translate y.

Return Value

Returns the DATransform2 object.

Remarks

The X and Y translation components are given by a02 and a12, respectively.

Translate2

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the specified amount. Same as Translate2Anim except tx and ty are nonanimated numbers (doubles).

Syntax

lib.Translate2( tx, ty )

Parameters

tx and ty
Values representing the amount to translate the point along the x-axis and y-axis, respectively. These are nonanimated numbers (double values).

Return Value

Returns the DATransform2 object.

Remarks

Two-dimensional vectors are unchanged by translations.

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Translate2Anim

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the amount given by the animated numbers.

Syntax

lib.Translate2Anim( tx, ty )

Parameters

tx and ty
DANumber objects representing the amount to translate the point along the x-axis and y-axis, respectively. These must be animated numbers.

Return Value

Returns the DATransform2 object.

Remarks

Two-dimensional vectors are unchanged by translations.

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Translate2Point

DAStatics Class

Creates a two-dimensional transformation that, when applied to a point, translates (moves) the point to the new location loc.

Syntax

lib.Translate2Point( loc )

Parameters

loc
DAPoint2 object specifying the new location. This must be an animated point.

Return Value

Returns the DATransform2 object.

Translate2Rate

DAStatics Class

Creates a two-dimensional transformation that, when applied to a point, translates (moves) the point by the amount given by the arguments. The translation rates are determined by multiplying the arguments by LocalTime.

Syntax

lib.Translate2Rate( x, y )

Parameters

x and y
Numbers (doubles) representing the amounts to translate the point along the x- and y-axes, respectively, multiplied by LocalTime.

Return Value

Returns the DATransform2 object.

Remarks

Two-dimensional vectors are unchanged by translations.

The units can either be meters per second or pixels per second, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

Translate2Vector

DAStatics Class

Creates a two-dimensional transformation behavior that, when applied to a point, translates (moves) the point by the amount given by the vector.

Syntax

lib.Translate2Vector( v )

Parameters

v
DAVector2 object. The x and y coordinates of the vector specify the amount to translate along the x and y axes, respectively. This must be an animated vector.

Return Value

Returns the DATransform2 object.

Remarks

Two-dimensional vectors are unchanged by translations.

XShear2

DAStatics Class

Creates a two-dimensional transformation that shears the x-axis either up or down. Same as XShear2Anim except that a is a nonanimated number (a double).

Syntax

lib.XShear2( a )

Parameters

a
A double value representing the amount to shear. This is a nonanimated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

XShear2Anim

DAStatics Class

Creates a two-dimensional transformation that shears the x-axis either up or down. This means the x-coordinate of the points remains unchanged, and the y-coordinate increases by the product of the x-coordinate and the shear factor. In other words, X2 = X1, and Y2 = Y1 + aX1, where a is the shear factor.

Syntax

lib.XShear2Anim( a )

Parameters

a
DANumber object representing the amount to shear. This must be an animated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

See Also

YShearAnim

XShear2Rate

DAStatics Class

Creates a two-dimensional transformation that shears the x-axis either up or down. The shear rate is determined by multiplying the argument by LocalTime.

Syntax

lib.XShear2Rate( rate )

Parameters

rate
Number (a double) representing the amount to shear, multiplied by LocalTime.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters per second or pixels per second, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

YShear2

DAStatics Class

Creates a two-dimensional transformation that shears the y-axis either left or right. Same as YShear2Anim except that a is a nonanimated number (a double).

Syntax

lib.YShear2( a )

Parameters

a
A double value representing the amount to shear. This is a nonanimated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

YShear2Anim

DAStatics Class

Creates a two-dimensional transformation that shears the y-axis either left or right. This means the y-coordinate of the points remains unchanged, and the x-coordinate increases by the product of the y-coordinate and the shear factor. In other words, Y2 = Y1 and X2 = X1 + aY1, where a is the shear factor.

Syntax

lib.YShear2Anim( a )

Parameters

a
DANumber object representing the amount to shear. This must be an animated number.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters or pixels, depending on whether the MeterLibrary or the PixelLibrary is selected. If the PixelLibrary is selected, remember that the positive y-axis is down.

See Also

XShear2Anim

YShear2Rate

DAStatics Class

Creates a two-dimensional transformation that shears the y-axis either left or right. The shear rate is determined by multiplying the argument by LocalTime.

Syntax

lib.YShear2Rate( rate )

Parameters

rate
Number (a double) representing the amount to shear the y-axis, multiplied by LocalTime.

Return Value

Returns the DATransform2 object.

Remarks

The units can either be meters per second or pixels per second, depending on whether the MeterLibrary or the PixelLibrary is selected.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.