- Common ways to obtain PdfContentByte
private void myMethod () {PdfContentByte p =
PdfWriter writer;writer.getDirectContent()
PdfStamper pdfStamper;pdfStamper.getOverContent(pageNum)
PdfStamper pdfStamper;pdfStamper.getUnderContent(pageNum)
- Smart code suggestions by Codota
}
public void strokeAndFill(){ MetaPen pen = state.getCurrentPen(); MetaBrush brush = state.getCurrentBrush(); int penStyle = pen.getStyle(); int brushStyle = brush.getStyle(); if (penStyle == MetaPen.PS_NULL) { cb.closePath(); if (state.getPolyFillMode() == MetaState.ALTERNATE) { cb.eoFill(); } else { cb.fill(); } } else { boolean isBrush = brushStyle == MetaBrush.BS_SOLID || brushStyle == MetaBrush.BS_HATCHED && state.getBackgroundMode() == MetaState.OPAQUE; if (isBrush) { if (state.getPolyFillMode() == MetaState.ALTERNATE) cb.closePathEoFillStroke(); else cb.closePathFillStroke(); } else { cb.closePathStroke(); } } }
if (traces > 0) { if (points.getWindingRule() == PathIterator.WIND_EVEN_ODD) cb.eoFill(); else cb.fill();
public void strokeAndFill(){ MetaPen pen = state.getCurrentPen(); MetaBrush brush = state.getCurrentBrush(); int penStyle = pen.getStyle(); int brushStyle = brush.getStyle(); if (penStyle == MetaPen.PS_NULL) { cb.closePath(); if (state.getPolyFillMode() == MetaState.ALTERNATE) { cb.eoFill(); } else { cb.fill(); } } else { boolean isBrush = brushStyle == MetaBrush.BS_SOLID || brushStyle == MetaBrush.BS_HATCHED && state.getBackgroundMode() == MetaState.OPAQUE; if (isBrush) { if (state.getPolyFillMode() == MetaState.ALTERNATE) cb.closePathEoFillStroke(); else cb.closePathFillStroke(); } else { cb.closePathStroke(); } } }
if (traces > 0) { if (points.getWindingRule() == PathIterator.WIND_EVEN_ODD) cb.eoFill(); else cb.fill();