OpenSpace.ScreenPoint

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

Inherits

  • <OpenLayers.Pixel>
Summary
OpenSpace.ScreenPointThis class represents a screen coordinate, in x and y coordinates
Constructor
OpenSpace.ScreenPointCreate a new OpenSpace.ScreenPoint instance
Functions
toStringCast this object into a string
cloneReturn a clone of this ScreenPoint object
equalsDetermine whether one pixel is equivalent to another
add
offsetParameters 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

toString

toString:function()

Cast this object into a string

Returns

{String} The string representation of ScreenPoint. ex: “x=200.4,y=242.2”

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.

toString:function()
Cast this object into a string
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
Close