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 booleancanEqual(java.lang.Object other)doublediameter()Get the length of the diagonal of the boundary rectanglebooleanequals(java.lang.Object o)javafx.scene.canvas.CanvasgetCanvas()Link to the addressed canvas.org.locationtech.jts.math.Vector2DgetCanvasDimensions()org.locationtech.jts.math.Vector2DgetDiagonal()Width and height of the rectangle.doublegetMaxX()doublegetMaxY()doublegetMinX()doublegetMinY()org.locationtech.jts.math.Vector2DgetOffset()Upper left corner of the rectangle.PointTransformationgetTransformation()Link to the related point transformation.inthashCode()voidsetCanvas(javafx.scene.canvas.Canvas canvas)Link to the addressed canvas.voidsetDiagonal(org.locationtech.jts.math.Vector2D diagonal)Width and height of the rectangle.voidsetOffset(org.locationtech.jts.math.Vector2D offset)Upper left corner of the rectangle.voidsetTransformation(PointTransformation transformation)Link to the related point transformation.java.lang.StringtoString()voidupdate()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:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-