Example usage for java.awt.geom Rectangle2D.Double contains

List of usage examples for java.awt.geom Rectangle2D.Double contains

Introduction

In this page you can find the example usage for java.awt.geom Rectangle2D.Double contains.

Prototype

public boolean contains(Point2D p) 

Source Link

Usage

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);
}