1 50 51 package com.lowagie.text.pdf; 52 53 57 public class SpotColor extends ExtendedColor { 58 59 private static final long serialVersionUID = -6257004582113248079L; 60 PdfSpotColor spot; 61 float tint; 62 63 public SpotColor(PdfSpotColor spot, float tint) { 64 super(TYPE_SEPARATION, 65 ((float)spot.getAlternativeCS().getRed() / 255f - 1f) * tint + 1, 66 ((float)spot.getAlternativeCS().getGreen() / 255f - 1f) * tint + 1, 67 ((float)spot.getAlternativeCS().getBlue() / 255f - 1f) * tint + 1); 68 this.spot = spot; 69 this.tint = tint; 70 } 71 72 public SpotColor(PdfSpotColor spot) { 73 this(spot, spot.getTint()); 74 } 75 76 public PdfSpotColor getPdfSpotColor() { 77 return spot; 78 } 79 80 public float getTint() { 81 return tint; 82 } 83 84 public boolean equals(Object obj) { 85 return this == obj; 86 } 87 88 public int hashCode() { 89 return spot.hashCode() ^ Float.floatToIntBits(tint); 90 } 91 } 92 | Popular Tags |