List of usage examples for java.awt.geom Rectangle2D.Double contains
public boolean contains(Point2D p)
From source file:uk.ac.ebi.cysbgn.methods.SegmentMethods.java
public static boolean containsPoint(Double squareCenterX, Double squareCenterY, Double squareWidth, Point2D.Double point) { Rectangle2D.Double square = new Rectangle2D.Double(squareCenterX - squareWidth / 2, squareCenterY - squareWidth / 2, squareWidth, squareWidth); return square.contains(point); }