List of usage examples for com.itextpdf.text.pdf PdfContentByte setGrayFill
public void setGrayFill(final float gray)
From source file:mkl.testarea.itext5.pdfcleanup.StrictPdfCleanUpProcessor.java
License:Open Source License
private void setFillColor(PdfContentByte canvas, List fillColorArgs) { switch (fillColorArgs.size()) { case 1:// w ww . j a v a2s. c o m canvas.setGrayFill(((PdfNumber) fillColorArgs.get(0)).floatValue()); break; case 3: canvas.setRGBColorFillF(((PdfNumber) fillColorArgs.get(0)).floatValue(), ((PdfNumber) fillColorArgs.get(1)).floatValue(), ((PdfNumber) fillColorArgs.get(2)).floatValue()); break; case 4: canvas.setCMYKColorFillF(((PdfNumber) fillColorArgs.get(0)).floatValue(), ((PdfNumber) fillColorArgs.get(1)).floatValue(), ((PdfNumber) fillColorArgs.get(2)).floatValue(), ((PdfNumber) fillColorArgs.get(3)).floatValue()); break; } }