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