List of usage examples for com.itextpdf.text.pdf PdfContentByte setRGBColorFillF
public void setRGBColorFillF(final float red, final float green, final float blue)
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:/*from ww w. j a v a 2 s . 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; } }