1 18 package org.apache.batik.ext.awt; 19 20 import java.awt.RenderingHints ; 21 22 29 public final class RenderingHintsKeyExt { 30 public static final int KEY_BASE; 31 32 35 public static final RenderingHints.Key KEY_TRANSCODING; 36 37 public static final String VALUE_TRANSCODING_PRINTING = 38 new String ("Printing"); 39 40 public static final String VALUE_TRANSCODING_VECTOR = 41 new String ("Vector"); 42 43 47 public static final RenderingHints.Key KEY_AREA_OF_INTEREST; 48 49 59 public static final RenderingHints.Key KEY_BUFFERED_IMAGE; 60 61 66 public static final RenderingHints.Key KEY_COLORSPACE; 67 68 74 public static final RenderingHints.Key KEY_AVOID_TILE_PAINTING; 75 76 public static final Object VALUE_AVOID_TILE_PAINTING_ON = new Object (); 77 public static final Object VALUE_AVOID_TILE_PAINTING_OFF = new Object (); 78 public static final Object VALUE_AVOID_TILE_PAINTING_DEFAULT = new Object (); 79 80 static { 81 int base = 10100; 82 RenderingHints.Key trans=null, aoi=null, bi=null, cs=null, atp=null; 83 while (true) { 84 int val = base; 85 86 try { 87 trans = new TranscodingHintKey (val++); 88 aoi = new AreaOfInterestHintKey(val++); 89 bi = new BufferedImageHintKey (val++); 90 cs = new ColorSpaceHintKey (val++); 91 atp = new AvoidTilingHintKey (val++); 92 } catch (Exception e) { 93 System.err.println 94 ("You have loaded the Batik jar files more than once\n" + 95 "in the same JVM this is likely a problem with the\n" + 96 "way you are loading the Batik jar files."); 97 98 base = (int)(Math.random()*2000000); 99 continue; 100 } 101 break; 102 } 103 KEY_BASE = base; 104 KEY_TRANSCODING = trans; 105 KEY_AREA_OF_INTEREST = aoi; 106 KEY_BUFFERED_IMAGE = bi; 107 KEY_COLORSPACE = cs; 108 KEY_AVOID_TILE_PAINTING = atp; 109 } 110 111 114 private RenderingHintsKeyExt(){ 115 } 116 } 117 | Popular Tags |