Example usage for com.itextpdf.text.pdf.parser Path closeSubpath

List of usage examples for com.itextpdf.text.pdf.parser Path closeSubpath

Introduction

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

Prototype

public void closeSubpath() 

Source Link

Document

Closes the current subpath.

Usage

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

License:Open Source License

private static void addContour(Path path, List<LongPoint> contour, Boolean close) {
    List<Point2D> floatContour = convertToFloatPoints(contour);
    Iterator<Point2D> iter = floatContour.iterator();

    Point2D point = iter.next();// w  w w .j av a2s  .  c  o m
    path.moveTo((float) point.getX(), (float) point.getY());

    while (iter.hasNext()) {
        point = iter.next();
        path.lineTo((float) point.getX(), (float) point.getY());
    }

    if (close) {
        path.closeSubpath();
    }
}