    Contents  Index  Topic Contents
    Previous Topic: DAPickableResult Class
    Next Topic: DAPoint3 Class

> ## DAPoint2 Class

> Creates a DAPoint2 object that represents a two-dimensional point that can be animated (vary over time). At any given time, the value is a point representing a location in a plane or on the screen. Each point has a pair of coordinate values that define the point's location relative to a fixed point called the origin. These coordinate values are given as either Cartesian coordinates (x,y) or polar coordinates (XYangle,length) when the point DAPoint2 object is created.

> Because coordinate values are DANumber objects the location of a DAPoint2 can change over time as the DANumbers change.

> This class inherits from DABehavior.

> - DAPoint2 Functions
> - DAPoint2 Properties
> - Relevant Functions from the DAStatics Class
> - Relevant Properties from the DAStatics Class

> ### DAPoint2 Functions

> AnimateControlPositionPixel

> Transform

> ####

> AnimateControlPositionPixel

> DAPoint2 Class

> Used to form fragments of script and pass them to the scripting engine on every frame. This function is specifically with DAPoint2 objects to animate the two-dimensional position of an element on the page.

> The AnimateControlPositionPixel function always treats the values of the points as pixels rather than meters and considers positive-y to be down rather than up. The (0,0) point is in the upper-left corner.

> point2Obj.AnimateControlPositionPixel(
> property,
> language,
> invoke,
> interval
> )

> ##### Parameters

> property
>   A string that is either the name of the property to animate or the name of a scripting function to invoke that will set the property.
> language
>   A string that is name of the scripting language.
> invoke
>   A boolean that determines if the position is set directly or if a function is invoked. If FALSE, the position is set directly. If TRUE, a function is invoked.
> interval
>   A double specifying how frequently the position is updated.

> ##### Return Values

> Returns the DAPoint2 object.

> ####

> Transform

> DAPoint2 Class

> Creates a DAPoint2 object that is the result of applying the given transformation to the original DAPoint2 object.

> point2Obj.Transform(
> xf
> )

> ##### Parameters

> xf
>   The DATransform2 object.

> ##### Return Values

> Returns the DAPoint2 object.

> ##### Remarks

> This function composes values. The resulting transformation is the new value applied to the old value.

> ### DAPoint2 Properties

> PolarCoordAngle

> PolarCoordLength

> X

> Y

> ####

> PolarCoordAngle

> DAPoint2 Class

> A read-only property with a DANumber value that represents the counter-clockwise angular displacement, in radians, relative to the positive x-axis, of the pointObj. The range is [-Pi, +Pi].

> point2Obj.PolarCoordAngle

> ##### See Also

> PolarCoordLength, Point2PolarAnim

> ####

> PolarCoordLength

> DAPoint2 Class

> A read-only property with a DANumber value that represents the distance of the point from the origin.

> point2Obj.PolarCoordLength

> ##### See Also

> PolarCoordAngle, Point2PolarAnim

> ####

> X

> DAPoint2 Class

> A read-only property with a DANumber value that represents the x coordinate of the point2Obj.

> point2Obj.X

> ##### Return Values

> Returns the DANumber object.

> ##### See Also

> Y, Point2Anim

> ####

> Y

> DAPoint2 Class

> A read-only property with a DANumber value that represents the y coordinate of the point2Obj.

> point2Obj.Y

> ##### See Also

> X, Point2Anim

> ### Relevant Functions from the DAStatics Class

> The following functions are defined in the DAStatics class and are most relevant to objects of type DAPoint2.

> lib.AddPoint2Vector(pt, vec)

> lib.DerivativePoint2(pt)

> lib.DistancePoint2(p1, p2)

> lib.DistanceSquaredPoint2(p1, p2)

> lib.Point2(x, y)

> lib.Point2Anim(x, y)

> lib.Point2BSpline(degree, knots, control_elements, weights, evaluation)

> lib.Point2PolarAnim(XYangle, length)

> lib.Point2Polar(XYangle, length)

> lib.SubPoint2(p1, p2)

> lib.SubPoint2Vector(pt, vec)

> ### Relevant Properties from the DAStatics Class

> The following properties are defined in the DAStatics class and are most relevant to objects of type DAPoint2.

> lib.MousePosition

> lib.Origin2

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

> Top of Page