Package com.treasure.hunt.jts
Class CanvasBoundary
- java.lang.Object
-
- com.treasure.hunt.jts.CanvasBoundary
-
public class CanvasBoundary extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CanvasBoundary(javafx.scene.canvas.Canvas canvas, PointTransformation transformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(java.lang.Object other)
double
diameter()
Get the length of the diagonal of the boundary rectangleboolean
equals(java.lang.Object o)
javafx.scene.canvas.Canvas
getCanvas()
Link to the addressed canvas.org.locationtech.jts.math.Vector2D
getCanvasDimensions()
org.locationtech.jts.math.Vector2D
getDiagonal()
Width and height of the rectangle.double
getMaxX()
double
getMaxY()
double
getMinX()
double
getMinY()
org.locationtech.jts.math.Vector2D
getOffset()
Upper left corner of the rectangle.PointTransformation
getTransformation()
Link to the related point transformation.int
hashCode()
void
setCanvas(javafx.scene.canvas.Canvas canvas)
Link to the addressed canvas.void
setDiagonal(org.locationtech.jts.math.Vector2D diagonal)
Width and height of the rectangle.void
setOffset(org.locationtech.jts.math.Vector2D offset)
Upper left corner of the rectangle.void
setTransformation(PointTransformation transformation)
Link to the related point transformation.java.lang.String
toString()
void
update()
Update the rectangles dimension and offset.
-
-
-
Constructor Detail
-
CanvasBoundary
public CanvasBoundary(javafx.scene.canvas.Canvas canvas, PointTransformation transformation)
-
-
Method Detail
-
getMinX
public double getMinX()
-
getMaxX
public double getMaxX()
-
getMinY
public double getMinY()
-
getMaxY
public double getMaxY()
-
diameter
public double diameter()
Get the length of the diagonal of the boundary rectangle- Returns:
- length of diagonal
-
getCanvasDimensions
public org.locationtech.jts.math.Vector2D getCanvasDimensions()
-
update
public void update()
Update the rectangles dimension and offset.
-
getTransformation
public PointTransformation getTransformation()
Link to the related point transformation.
-
getOffset
public org.locationtech.jts.math.Vector2D getOffset()
Upper left corner of the rectangle.
-
getDiagonal
public org.locationtech.jts.math.Vector2D getDiagonal()
Width and height of the rectangle.
-
getCanvas
public javafx.scene.canvas.Canvas getCanvas()
Link to the addressed canvas.
-
setTransformation
public void setTransformation(PointTransformation transformation)
Link to the related point transformation.
-
setOffset
public void setOffset(org.locationtech.jts.math.Vector2D offset)
Upper left corner of the rectangle.
-
setDiagonal
public void setDiagonal(org.locationtech.jts.math.Vector2D diagonal)
Width and height of the rectangle.
-
setCanvas
public void setCanvas(javafx.scene.canvas.Canvas canvas)
Link to the addressed canvas.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-