Point
Contents
[
Hide
]Inheritance: java.lang.Object
public final class Point
Represent point with fractional coordinates.
Constructors
Constructor | Description |
---|---|
Point(double x, double y) | Initializes new instance of the Point . |
Methods
Method | Description |
---|---|
getX() | Gets X coordinate value. |
setX(double value) | Sets X coordinate value. |
getY() | Gets Y coordinate value. |
setY(double value) | Sets Y coordinate value. |
getTrivial() | Gets point with zero coordinates. |
toPoint() | Converts point into java.awt.geom.Point2D.Float object. |
toString() | Return string representation current point. |
Point(double x, double y)
public Point(double x, double y)
Initializes new instance of the Point .
Parameters:
Parameter | Type | Description |
---|---|---|
x | double | x coordinate value. |
y | double | y coordinate value. |
getX()
public double getX()
Gets X coordinate value.
Returns: double - double value
setX(double value)
public void setX(double value)
Sets X coordinate value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | double value |
getY()
public double getY()
Gets Y coordinate value.
Returns: double - double value
setY(double value)
public void setY(double value)
Sets Y coordinate value.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | double value |
getTrivial()
public static Point getTrivial()
Gets point with zero coordinates.
Returns: Point - Point object
toPoint()
public Point2D.Float toPoint()
Converts point into java.awt.geom.Point2D.Float object.
Returns: java.awt.geom.Point2D.Float - Float structure.
toString()
public String toString()
Return string representation current point.
Returns: java.lang.String - String, representing current point.