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 DAPoint2 object is created.
Because coordinate values are DANumber objects, the location of a DAPoint2 can change over time as the DANumber objects change.
This class inherits from DABehavior.
For relevant functions and properties from the DAStatics class, see the following topics.
DAPoint2 Functions
AnimateControlPosition Used to form fragments of script and pass them to the scripting engine on every frame. This function treats points as meters rather than pixels. AnimateControlPositionPixel Used to form fragments of script and pass them to the scripting engine on every frame. This function treats points as pixels rather than meters. Transform Creates a DAPoint2 object that is the result of applying the given transformation to the original DAPoint2 object.
DAPoint2 Properties
PolarCoordAngle 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 point2Obj. PolarCoordLength A read-only property with a DANumber value that represents the distance of the point from the origin. X A read-only property with a DANumber value that represents the x coordinate of the DAPoint2 object. Y A read-only property with a DANumber value that represents the y coordinate of the DAPoint2 object.
This section contains reference material on the DAPoint2 functions.
Used to form fragments of script and pass them to the scripting engine on every frame. This function is used specifically with DAPoint2 objects to animate the two-dimensional position of an element on the page.
The AnimateControlPosition function always treats the values of the points as meters and considers positive-y to be up. The (0,0) point is in the center of the display area.
Syntax
point2Obj.AnimateControlPosition( property, language, invoke, interval )
Parameters
- property
- 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
- String that is name of the scripting language.
- invoke
- Boolean value 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 value specifying how frequently the position is updated.
Return Value
Returns the DAPoint2 object.
Used to form fragments of script and pass them to the scripting engine on every frame. This function is used 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.
Syntax
point2Obj.AnimateControlPositionPixel( property, language, invoke, interval )
Parameters
- property
- 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
- String that is name of the scripting language.
- invoke
- Boolean value 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 value specifying how frequently the position is updated.
Return Value
Returns the DAPoint2 object.
Creates a DAPoint2 object that is the result of applying the given transformation to the original DAPoint2 object.
Syntax
point2Obj.Transform( xf )
Parameters
- xf
- DATransform2 object.
Return Value
Returns the DAPoint2 object.
Remarks
This function composes values. The resulting transformation is the new value applied to the old value.
This section contains reference material on the DAPoint2 properties.
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 point2Obj. The range is [-Pi, +Pi].
Syntax
point2Obj.PolarCoordAngle
See Also
A read-only property with a DANumber value that represents the distance of the point from the origin.
Syntax
point2Obj.PolarCoordLength
See Also
A read-only property with a DANumber value that represents the x coordinate of the point2Obj.
Syntax
point2Obj.X
Return Value
Returns the DANumber object.
See Also
A read-only property with a DANumber value that represents the y coordinate of the point2Obj.
Syntax
point2Obj.Y
See Also
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.