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