Package | com.yworks.canvas.geom |
Class | public class YPoint |
Inheritance | YPoint Object |
Implements | IMutablePoint, IMovable |
Property | Defined By | ||
---|---|---|---|
x : Number
The x coordinate. | YPoint | ||
y : Number
The y coordinate. | YPoint |
Method | Defined By | ||
---|---|---|---|
YPoint(x:Number, y:Number)
Creates an instance using the given coordinate pair. | YPoint | ||
[static]
Creates an instance using the given coordinate pair. | YPoint | ||
[static]
Creates a dynamic IMutablePoint implementation that delegates to the given instances. | YPoint | ||
[static]
Creates an instance using the coordinates of the given point. | YPoint | ||
moveBy(dx:Number, dy:Number):Boolean
Moves this instance by adding the provided offsets to the coordinates of this point. | YPoint | ||
moveByDx(dx:Number):Boolean
Moves this instance by adding the provided offset to the x coordinate of this point. | YPoint | ||
moveByDy(dy:Number):Boolean
Moves this instance by adding the provided offset to the y coordinate of this point. | YPoint | ||
Sets the coordinates of this instance to the current state of the
coordinates of the point provided. | YPoint |
x | property |
x:Number
The x coordinate.
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
The y coordinate.
public function get y():Number
public function set y(value:Number):void
YPoint | () | Constructor |
public function YPoint(x:Number, y:Number)
Creates an instance using the given coordinate pair.
Parametersx:Number — The x-coordinate.
| |
y:Number — The y-coordinate.
|
create | () | method |
public static function create(px:Number = 0, py:Number = 0):YPoint
Creates an instance using the given coordinate pair.
Parameters
px:Number (default = 0 ) — The x-coordinate.
| |
py:Number (default = 0 ) — The y-coordinate.
|
YPoint — An instance of the YPoint class.
|
createDynamic | () | method |
public static function createDynamic(getter:IPoint, setter:IPointSetter):IMutablePoint
Creates a dynamic IMutablePoint
implementation that delegates to the given instances.
Note that the implementation implements IMutablePoint
only. It cannot be cast to YPoint
.
Parameters
getter:IPoint — The instance used to read the state of the point.
| |
setter:IPointSetter — The instance used to write the state of the point.
|
IMutablePoint — An instance that provides a live view of the two given instances.
|
createFrom | () | method |
public static function createFrom(point:IPoint):YPoint
Creates an instance using the coordinates of the given point.
Parameters
point:IPoint — The point which's coordinates shall be used.
|
YPoint — An instance of the YPoint class
|
moveBy | () | method |
public function moveBy(dx:Number, dy:Number):Boolean
Moves this instance by adding the provided offsets to the coordinates of this point.
Parameters
dx:Number — The offset to add to this point's x coordinate
| |
dy:Number — The offset to add to this point's y coordinate
|
Boolean — true if dx != 0 || dy != 0
|
moveByDx | () | method |
public function moveByDx(dx:Number):Boolean
Moves this instance by adding the provided offset to the x coordinate of this point.
Parameters
dx:Number |
Boolean — true if dx != 0 .
|
moveByDy | () | method |
public function moveByDy(dy:Number):Boolean
Moves this instance by adding the provided offset to the y coordinate of this point.
Parameters
dy:Number |
Boolean — true if dy != 0 .
|
setTo | () | method |
public function setTo(point:IPoint):void
Sets the coordinates of this instance to the current state of the coordinates of the point provided.
Parameters
point:IPoint — The point to obtain the values from.
|