1 18 package org.apache.batik.transcoder.image; 19 20 import java.util.HashMap ; 21 import java.util.Map ; 22 23 import org.apache.batik.transcoder.TranscoderInput; 24 25 31 public class DefaultFontFamilyTest extends AbstractImageTranscoderTest { 32 33 34 protected String inputURI; 35 36 37 protected String refImageURI; 38 39 40 protected String defaultFontFamily; 41 42 49 public DefaultFontFamilyTest(String inputURI, 50 String refImageURI, 51 String defaultFontFamily) { 52 this.inputURI = inputURI; 53 this.refImageURI = refImageURI; 54 this.defaultFontFamily = defaultFontFamily; 55 } 56 57 60 protected TranscoderInput createTranscoderInput() { 61 return new TranscoderInput(resolveURL(inputURI).toString()); 62 } 63 64 67 protected Map createTranscodingHints() { 68 Map hints = new HashMap (3); 69 hints.put(ImageTranscoder.KEY_DEFAULT_FONT_FAMILY, defaultFontFamily); 70 return hints; 71 } 72 73 76 protected byte [] getReferenceImageData() { 77 return createBufferedImageData(resolveURL(refImageURI)); 78 } 79 } 80 | Popular Tags |