Example usage for com.itextpdf.text.pdf.parser.clipper Paths Paths

List of usage examples for com.itextpdf.text.pdf.parser.clipper Paths Paths

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.parser.clipper Paths Paths.

Prototype

public Paths() 

Source Link

Usage

From source file:mkl.testarea.itext5.pdfcleanup.PdfCleanUpRegionFilter.java

License:Open Source License

private boolean intersect(Point2D[] rect1, Point2D[] rect2) {
    Clipper clipper = new DefaultClipper();
    addRect(clipper, rect1, PolyType.SUBJECT);
    addRect(clipper, rect2, PolyType.CLIP);

    Paths paths = new Paths();
    clipper.execute(ClipType.INTERSECTION, paths, PolyFillType.NON_ZERO, PolyFillType.NON_ZERO);

    return !paths.isEmpty();
}