List of usage examples for com.itextpdf.text.pdf.parser.clipper Clipper addPath
boolean addPath(Path pg, PolyType polyType, boolean Closed);
From source file:mkl.testarea.itext5.pdfcleanup.PdfCleanUpRegionFilter.java
License:Open Source License
private static void addPath(Clipper clipper, Path path) { for (Subpath subpath : path.getSubpaths()) { if (!subpath.isSinglePointClosed() && !subpath.isSinglePointOpen()) { List<Point2D> linearApproxPoints = subpath.getPiecewiseLinearApproximation(); clipper.addPath(convertToIntPoints(linearApproxPoints), PolyType.SUBJECT, subpath.isClosed()); }/*from w w w .ja v a 2 s . co m*/ } }
From source file:mkl.testarea.itext5.pdfcleanup.PdfCleanUpRegionFilter.java
License:Open Source License
private static void addRect(Clipper clipper, Point2D[] rectVertices, PolyType polyType) { clipper.addPath(convertToIntPoints(new ArrayList<Point2D>(Arrays.asList(rectVertices))), polyType, true); }