Example usage for javax.swing SwingUtilities computeIntersection

List of usage examples for javax.swing SwingUtilities computeIntersection

Introduction

In this page you can find the example usage for javax.swing SwingUtilities computeIntersection.

Prototype

public static Rectangle computeIntersection(int x, int y, int width, int height, Rectangle dest) 

Source Link

Document

Convenience to calculate the intersection of two rectangles without allocating a new rectangle.

Usage

From source file:GraphicsUtil.java

public static Rectangle calculateIntersectionClip(int x, int y, int width, int height, Shape originalClip) {
    Rectangle bounds = originalClip.getBounds();
    SwingUtilities.computeIntersection(x, y, width, height, bounds);
    return bounds;
}