List of usage examples for com.itextpdf.text.pdf CMYKColor getMagenta
public float getMagenta()
From source file:org.scantegrity.common.InvisibleInkFactory.java
License:Open Source License
private static void fillRect(BufferedImage p_img, CMYKColor p_color, int p_x, int p_y, int p_width, int p_height) { /*if (p_x + p_width > p_img.getWidth() || p_y + p_height > p_img.getHeight()) {/* ww w . j a va 2 s .c o m*/ System.err.println("Array index out of bounds on fillrect!"); return; }*/ float[] l_c = { p_color.getCyan(), p_color.getMagenta(), p_color.getYellow(), p_color.getBlack() }; float[] l_dbuf = ((DataBufferFloat) p_img.getRaster().getDataBuffer()).getData(); int l_doff = 0; for (int y = 0; y < p_height; y++) { // ROW X offset l_doff = ((y + p_y) * p_img.getWidth() + p_x) * 4; for (int x = 0; x < p_width; x++) { System.arraycopy(l_c, 0, l_dbuf, l_doff, 4); l_doff += 4; } } }