OpenSpace. ScreenPoint

This class represents a screen coordinate, in x and y coordinates

Inherits

Summary
This class represents a screen coordinate, in x and y coordinates
Create a new OpenSpace.ScreenPoint instance
Return a clone of this ScreenPoint object
Determine whether one pixel is equivalent to another
Parameters px - {OpenSpace.ScreenPoint}

Constructor

OpenSpace. ScreenPoint

Create a new OpenSpace.ScreenPoint instance

Parameters

x{Number} The x coordinate
y{Number} The y coordinate

Returns

An instance of OpenSpace.ScreenPoint

Functions

clone

clone:function()

Return a clone of this ScreenPoint object

Returns

{OpenSpace.ScreenPoint} A clone screen point

equals

equals:function(px)

Determine whether one pixel is equivalent to another

Parameters

px{OpenSpace.ScreenPoint}

Returns

{Boolean} The point passed in as parameter is equal to this.  Note that if px passed in is null, returns false.

add

add:function(x,
y)

Parameters

x{Integer}
y{Integer}

Returns

{OpenSpace.ScreenPoint} A new Pixel with this pixel’s x&y augmented by the values passed in.

offset

offset:function(px)

Parameters px - {OpenSpace.ScreenPoint}

Returns

{OpenSpace.ScreenPoint} A new Pixel with this pixel’s x&y augmented by the x&y values of the pixel passed in.

clone:function()
Return a clone of this ScreenPoint object
equals:function(px)
Determine whether one pixel is equivalent to another
add:function(x,
y)
offset:function(px)
Parameters px - {OpenSpace.ScreenPoint}
Create a new OpenSpace.ScreenPoint instance
This class represents a screen coordinate, in x and y coordinates