    Contents  Index  Topic Contents
    Previous Topic: DAStatic Functions Relevant to DAString Objects
    Next Topic: DAStatic Properties Relevant to DATransform2 Objects

> ## DAStatic Functions Relevant to DATransform2 Objects

> ###

> Compose2

> DAStatics Class

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

> lib.Compose2(
> xf1,
> xf2
> )

> ##### Parameters

> xf1 and xf2
>   The DATransform2 objects used in the composition.

> ##### Return Values

> 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.

> lib.Compose2Array(
> xforms
> )

> ##### Parameters

> xforms
>   The DATransform2 objects included in the (variant) array.

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

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

> ###

> 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.

> lib.FollowPathEval(
> path,
> evaluator
> )

> ##### Parameters

> path
>   The DAPath2 object that will be traced.
> evaluator
>   The 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 Values

> Returns the DATransform2 object.

> ###

> 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.

> lib.FollowPath(
> path,
> duration
> )

> ##### Parameters

> path
>   The DAPath2 object that will be traced.
> 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 Values

> 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.

> lib.FollowPathAngleEval(
> path,
> evaluator
> )

> ##### Parameters

> path
>   The DAPath2 object which is traversed.
> evaluator
>   The 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 Values

> 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.

> lib.FollowPathAngle(
> path,
> duration
> )

> ##### Parameters

> path
>   The DAPath2 object which is 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 Values

> 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.

> lib.FollowPathAngleUprightEval(
> path,
> evaluator
> )

> ##### Parameters

> path
>   The DAPath2 object which will be traversed.
> evaluator
>   The 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 Values

> 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.

> lib.FollowPathAngleUpright(
> path,
> duration
> )

> ##### Parameters

> path
>   The 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 Values

> Returns the DATransform2 object.

> ###

> 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).

> lib.Rotate2Anim(
> radians
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

> Rotations are counter-clockwise.

> ###

> Rotate2

> DAStatics Class

> Same as Rotate2Anim except radians is a non-animated number (a double).

> lib.Rotate2(
> radians
> )

> ###

> Rotate2-Degrees

> 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).

> lib.Rotate2-Degrees(
> degrees
> )

> ##### Parameters

> degrees
>   The number (a double) representing the angle of rotation (expressed in degrees).

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

> Rotations are counter-clockwise.

> ###

> 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.

> lib.Rotate2Rate(
> radians
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

> Rotations are counter-clockwise.

> ###

> 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.

> lib.Rotate2RateDegrees(
> degrees
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

> Rotations are counter-clockwise.

> ###

> 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.

> lib.Scale2Anim(
> sx,
> sy
> )

> ##### Parameters

> sx and sy
>   The 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 Values

> 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.

> ###

> Scale2

> DAStatics Class

> Same as Scale2Anim except the parameter is a non-animated number (a double).

> lib.Scale2(
> sx,
> sy
> )

> ###

> 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.

> lib.Scale2Rate(
> x,
> y
> )

> ##### Parameters

> sx and sy
>   The 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 Values

> 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.

> ###

> Scale2UniformAnim

> DAStatics Class

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

> lib.Scale2UniformAnim(
> uniformFactor
> )

> ##### Parameters

> uniformFactor
>   The DANumber object representing the value to apply to both the x and y coordinates, respectively. These must be animated numbers.

> ##### Return Values

> 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

> ###

> Scale2Uniform

> DAStatics Class

> Same as Scale2UniformAnim except uniformFactor is a non-animated number (a double).

> lib.Scale2Uniform(
> uniformFactor
> )

> ###

> 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.

> lib.Scale2UniformRate(
> rate
> )

> ##### Parameters

> rate
>   The value to apply to both the x and y coordinates, respectively, multiplied by LocalTime.

> ##### Return Values

> 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.

> lib.Scale2Vector(
> v
> )

> ##### Parameters

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

> ##### Return Values

> 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.

> 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 Values

> Returns the DATransform2 object.

> ##### Remarks

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

> ###

> 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.

> lib.Translate2Anim(
> tx,
> ty
> )

> ##### Parameters

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

> ##### Return Values

> 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.

> ###

> Translate2

> DAStatics Class

> Same as Translate2Anim except tx and ty are non-animated numbers (doubles).

> lib.Translate2(
> tx,
> ty
> )

> ###

> Translate2Point

> DAStatics Class

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

> lib.Translate2Point(
> loc
> )

> ##### Parameters

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

> ##### Return Values

> 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.

> lib.Translate2Rate(
> x,
> y
> )

> ##### Parameters

> x and y
>   The numbers (doubles) representing the amounts to translate the point along the X and Y axes, respectively, multiplied by LocalTime.

> ##### Return Values

> 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.

> lib.Translate2Vector(
> v
> )

> ##### Parameters

> v
>   The 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 Values

> Returns the DATransform2 object.

> ##### Remarks

> Two-dimensional vectors are unchanged by translations.

> ###

> 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.

> lib.XShear2Anim(
> a
> )

> ##### Parameters

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

> ##### Return Values

> 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

> ###

> XShear2

> DAStatics Class

> Same as XShear2Anim except that x is a non-animated number (a double).

> lib.XShear2(
> a
> )

> ###

> 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.

> lib.XShear2Rate(
> rate
> )

> ##### Parameters

> rate
>   The number (a double) representing the amount to shear, multiplied by LocalTime.

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

> The units can either be meters/second or pixels/second, 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.

> lib.YShear2Anim(
> a
> )

> ##### Parameters

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

> ##### Return Values

> 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

> ###

> YShear2

> DAStatics Class

> Same as YShear2Anim except that y is a non-animated number (a double).

> lib.YShear2(
> a
> )

> ###

> 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.

> lib.YShear2Rate(
> rate
> )

> ##### Parameters

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

> ##### Return Values

> Returns the DATransform2 object.

> ##### Remarks

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

> © 1998 Microsoft Corporation. All rights reserved. Terms of Use.

> Top of Page