public class

ScreenPos

extends Object
java.lang.Object
   ↳ com.carto.core.ScreenPos

Class Overview

A screen position defined by x,y floating point numbers.

Summary

Public Constructors
ScreenPos()
Constructs a ScreenPos object.
ScreenPos(float x, float y)
Constructs a ScreenPos object from 2 coordinates.
Public Methods
synchronized void delete()
boolean equals(Object obj)
Checks if this object is equal to the specified object.
float getX()
Returns the x coordinate of this position.
float getY()
Returns the y coordinate of this position.
int hashCode()
Returns the hash value of this object.
String toString()
Creates a string representation of this screen position, useful for logging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ScreenPos ()

Constructs a ScreenPos object. All coordinates will be 0.

public ScreenPos (float x, float y)

Constructs a ScreenPos object from 2 coordinates.

Parameters
x The x coordinate.
y The y coordinate.

Public Methods

public synchronized void delete ()

public boolean equals (Object obj)

Checks if this object is equal to the specified object.

Parameters
obj The reference object.
Returns
  • True when objects are equal, false otherwise.

public float getX ()

Returns the x coordinate of this position.

Returns
  • The x coordinate of this position.

public float getY ()

Returns the y coordinate of this position.

Returns
  • The y coordinate of this position.

public int hashCode ()

Returns the hash value of this object.

Returns
  • The hash value of this object.

public String toString ()

Creates a string representation of this screen position, useful for logging.

Returns
  • The string representation of this screen position.