1 47 package com.lowagie.text.pdf; 48 49 53 public class PdfGState extends PdfDictionary { 54 55 public static final PdfName BM_NORMAL = new PdfName("Normal"); 56 57 public static final PdfName BM_COMPATIBLE = new PdfName("Compatible"); 58 59 public static final PdfName BM_MULTIPLY = new PdfName("Multiply"); 60 61 public static final PdfName BM_SCREEN = new PdfName("Screen"); 62 63 public static final PdfName BM_OVERLAY = new PdfName("Overlay"); 64 65 public static final PdfName BM_DARKEN = new PdfName("Darken"); 66 67 public static final PdfName BM_LIGHTEN = new PdfName("Lighten"); 68 69 public static final PdfName BM_COLORDODGE = new PdfName("ColorDodge"); 70 71 public static final PdfName BM_COLORBURN = new PdfName("ColorBurn"); 72 73 public static final PdfName BM_HARDLIGHT = new PdfName("HardLight"); 74 75 public static final PdfName BM_SOFTLIGHT = new PdfName("SoftLight"); 76 77 public static final PdfName BM_DIFFERENCE = new PdfName("Difference"); 78 79 public static final PdfName BM_EXCLUSION = new PdfName("Exclusion"); 80 81 85 public void setOverPrintStroking(boolean ov) { 86 put(PdfName.OP, ov ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE); 87 } 88 89 93 public void setOverPrintNonStroking(boolean ov) { 94 put(PdfName.op, ov ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE); 95 } 96 97 101 public void setOverPrintMode(int ov) { 102 put(PdfName.OPM, new PdfNumber(ov==0 ? 0 : 1)); 103 } 104 105 111 public void setStrokeOpacity(float n) { 112 put(PdfName.CA, new PdfNumber(n)); 113 } 114 115 121 public void setFillOpacity(float n) { 122 put(PdfName.ca, new PdfNumber(n)); 123 } 124 125 131 public void setAlphaIsShape(boolean v) { 132 put(PdfName.AIS, v ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE); 133 } 134 135 140 public void setTextKnockout(boolean v) { 141 put(PdfName.TK, v ? PdfBoolean.PDFTRUE : PdfBoolean.PDFFALSE); 142 } 143 144 148 public void setBlendMode(PdfName bm) { 149 put(PdfName.BM, bm); 150 } 151 152 } 153 | Popular Tags |