List of usage examples for com.itextpdf.text.pdf PdfContentByte setCMYKColorFillF
public void setCMYKColorFillF(final float cyan, final float magenta, final float yellow, final float black)
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:/* ww w . ja v a2s . c om*/ 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; } }
From source file:mkl.testarea.itext5.pdfcleanup.StrictPdfCleanUpProcessor.java
License:Open Source License
private void setStrokeColor(PdfContentByte canvas, List strokeColorArgs) { switch (strokeColorArgs.size()) { case 1:/*from w ww. j av a 2 s . c o m*/ canvas.setGrayStroke(((PdfNumber) strokeColorArgs.get(0)).floatValue()); break; case 3: canvas.setRGBColorStrokeF(((PdfNumber) strokeColorArgs.get(0)).floatValue(), ((PdfNumber) strokeColorArgs.get(1)).floatValue(), ((PdfNumber) strokeColorArgs.get(2)).floatValue()); break; case 4: canvas.setCMYKColorFillF(((PdfNumber) strokeColorArgs.get(0)).floatValue(), ((PdfNumber) strokeColorArgs.get(1)).floatValue(), ((PdfNumber) strokeColorArgs.get(2)).floatValue(), ((PdfNumber) strokeColorArgs.get(3)).floatValue()); break; } }