Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
Point

Package | org.apache.flex.geom
Class | public class Point
Inheritance | Point Object

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The Point class is a utility class for holding x and y values, not that you can't use it to hold a width and height value.

Public Properties

| Property | Defined By
--- | --- | ---
|  | length : Number [read-only] | Point
|  | x : Number | Point
|  | y : Number | Point

Public Methods

| Method | Defined By
--- | --- | ---
|  | Point(x:Number = 0, y:Number = 0) | Point
|  | add(v:Point):Point | Point
|  | clone():Point | Point
|  | copyFrom(sourcePoint:Point):void | Point
|  | distance(pt1:Point, pt2:Point):Number [static] | Point
|  | equals(toCompare:Point):Boolean | Point
|  | interpolate(pt1:Point, pt2:Point, f:Number):Point [static] | Point
|  | normalize(thickness:Number):void | Point
|  | offset(dx:Number, dy:Number):void | Point
|  | polar(len:Number, angle:Number):Point [static] | Point
|  | setTo(xa:Number, ya:Number):void | Point
|  | subtract(v:Point):Point | Point
|  | toString():String | Point

Property Detail

length | property

`length:Number` [read-only]

Implementation
`public function get length():Number`

x | property |

`public var x:Number`

y | property |

`public var y:Number`

Constructor Detail

Point | () | Constructor

`public function Point(x:Number = 0, y:Number = 0)`

Parameters

| `x:Number` (default = `0`)``
| `y:Number` (default = `0`)``

Method Detail

add | () | method

`public function add(v:Point):Point`

Parameters

| `v:Point`

Returns

| `Point`

clone | () | method |

`public function clone():Point`

Returns

| `Point`

copyFrom | () | method |

`public function copyFrom(sourcePoint:Point):void`

Parameters

| `sourcePoint:Point`

distance | () | method |

`public static function distance(pt1:Point, pt2:Point):Number`

Parameters

| `pt1:Point`
| `pt2:Point`

Returns

| `Number`

equals | () | method |

`public function equals(toCompare:Point):Boolean`

Parameters

| `toCompare:Point`

Returns

| `Boolean`

interpolate | () | method |

`public static function interpolate(pt1:Point, pt2:Point, f:Number):Point`

Parameters

| `pt1:Point`
| `pt2:Point`
| `f:Number`

Returns

| `Point`

normalize | () | method |

`public function normalize(thickness:Number):void`

Parameters

| `thickness:Number`

offset | () | method |

`public function offset(dx:Number, dy:Number):void`

Parameters

| `dx:Number`
| `dy:Number`

polar | () | method |

`public static function polar(len:Number, angle:Number):Point`

Parameters

| `len:Number`
| `angle:Number`

Returns

| `Point`

setTo | () | method |

`public function setTo(xa:Number, ya:Number):void`

Parameters

| `xa:Number`
| `ya:Number`

subtract | () | method |

`public function subtract(v:Point):Point`

Parameters

| `v:Point`

Returns

| `Point`

toString | () | method |

`public function toString():String`

Returns

| `String`

Mon Sep 5 2016, 07:19 AM -07:00