Example usage for java.awt Shape intersects

List of usage examples for java.awt Shape intersects

Introduction

In this page you can find the example usage for java.awt Shape intersects.

Prototype

public boolean intersects(double x, double y, double w, double h);

Source Link

Document

Tests if the interior of the Shape intersects the interior of a specified rectangular area.

Usage

From source file:Main.java

public static void main(String[] args) throws Exception {
    Shape s = new Rectangle2D.Double(0, 0, 72, 72);

    System.out.println(s.intersects(10, 10, 20, 20));
}