1 18 package org.apache.batik.ext.awt; 19 20 import java.awt.RenderingHints ; 21 22 28 public final class ColorSpaceHintKey extends RenderingHints.Key { 29 30 33 public static Object VALUE_COLORSPACE_ARGB = new Object (); 34 35 39 public static Object VALUE_COLORSPACE_RGB = new Object (); 40 41 44 public static Object VALUE_COLORSPACE_GREY = new Object (); 45 46 50 public static Object VALUE_COLORSPACE_AGREY = new Object (); 51 52 56 public static Object VALUE_COLORSPACE_ALPHA = new Object (); 57 58 63 public static Object VALUE_COLORSPACE_ALPHA_CONVERT = new Object (); 64 65 public static final String PROPERTY_COLORSPACE = 66 "org.apache.batik.gvt.filter.Colorspace"; 67 68 71 ColorSpaceHintKey(int number) { super(number); } 72 73 public boolean isCompatibleValue(Object val) { 74 if (val == VALUE_COLORSPACE_ARGB) return true; 75 if (val == VALUE_COLORSPACE_RGB) return true; 76 if (val == VALUE_COLORSPACE_GREY) return true; 77 if (val == VALUE_COLORSPACE_AGREY) return true; 78 if (val == VALUE_COLORSPACE_ALPHA) return true; 79 if (val == VALUE_COLORSPACE_ALPHA_CONVERT) return true; 80 return false; 81 } 82 } 83 84 | Popular Tags |