This class represents a screen coordinate, in x and y coordinates
OpenLayers. | This class represents a screen coordinate, in x and y coordinates |
Properties | |
x | {Number} The x coordinate |
y | {Number} The y coordinate |
Constructor | |
OpenLayers. | Create a new OpenLayers.Pixel instance |
Functions | |
toString | Cast this object into a string |
clone | Return a clone of this pixel object |
equals | Determine whether one pixel is equivalent to another |
distanceTo | Returns the distance to the pixel point passed in as a parameter. |
add | |
offset | Parameters px - {OpenLayers.Pixel} |
equals:function( px )
Determine whether one pixel is equivalent to another
px | {OpenLayers.Pixel} |
{Boolean} The point passed in as parameter is equal to this. Note that if px passed in is null, returns false.
distanceTo:function( px )
Returns the distance to the pixel point passed in as a parameter.
px | {OpenLayers.Pixel} |
{Float} The pixel point passed in as parameter to calculate the distance to.
add:function( x, y )
x | {Integer} |
y | {Integer} |
{OpenLayers.Pixel} A new Pixel with this pixel’s x&y augmented by the values passed in.
offset:function( px )
Parameters px - {OpenLayers.Pixel}
{OpenLayers.Pixel} A new Pixel with this pixel’s x&y augmented by the x&y values of the pixel passed in.
Cast this object into a string
toString:function()
Return a clone of this pixel object
clone:function()
Determine whether one pixel is equivalent to another
equals:function( px )
Returns the distance to the pixel point passed in as a parameter.
distanceTo:function( px )
add:function( x, y )
Parameters px - {OpenLayers.Pixel}
offset:function( px )