Example usage for com.itextpdf.text.pdf.parser PathPaintingRenderInfo getLineJoinStyle

List of usage examples for com.itextpdf.text.pdf.parser PathPaintingRenderInfo getLineJoinStyle

Introduction

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

Prototype

public int getLineJoinStyle() 

Source Link

Usage

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

License:Open Source License

public Path renderPath(PathPaintingRenderInfo renderInfo) {
    boolean stroke = (renderInfo.getOperation() & PathPaintingRenderInfo.STROKE) != 0;
    boolean fill = (renderInfo.getOperation() & PathPaintingRenderInfo.FILL) != 0;

    float lineWidth = renderInfo.getLineWidth();
    int lineCapStyle = renderInfo.getLineCapStyle();
    int lineJoinStyle = renderInfo.getLineJoinStyle();
    float miterLimit = renderInfo.getMiterLimit();
    LineDashPattern lineDashPattern = renderInfo.getLineDashPattern();

    if (stroke) {
        currentStrokePath = filterCurrentPath(renderInfo.getCtm(), true, -1, lineWidth, lineCapStyle,
                lineJoinStyle, miterLimit, lineDashPattern);
    }/*from w w w  . j  av a 2s .  c  o  m*/

    if (fill) {
        currentFillPath = filterCurrentPath(renderInfo.getCtm(), false, renderInfo.getRule(), lineWidth,
                lineCapStyle, lineJoinStyle, miterLimit, lineDashPattern);
    }

    if (clipPath) {
        if (fill && renderInfo.getRule() == clippingRule) {
            newClippingPath = currentFillPath;
        } else {
            newClippingPath = filterCurrentPath(renderInfo.getCtm(), false, clippingRule, lineWidth,
                    lineCapStyle, lineJoinStyle, miterLimit, lineDashPattern);
        }
    }

    unfilteredCurrentPath = new Path();
    return newClippingPath;
}