1 18 package org.apache.batik.transcoder.image; 19 20 import java.util.Map ; 21 import java.util.HashMap ; 22 23 import org.apache.batik.transcoder.TranscoderInput; 24 25 31 public class AlternateStylesheetTest extends AbstractImageTranscoderTest { 32 33 34 protected String inputURI; 35 36 37 protected String refImageURI; 38 39 40 protected String alternateStylesheet; 41 42 49 public AlternateStylesheetTest(String inputURI, 50 String refImageURI, 51 String alternateStylesheet) { 52 this.inputURI = inputURI; 53 this.refImageURI = refImageURI; 54 this.alternateStylesheet = alternateStylesheet; 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_ALTERNATE_STYLESHEET, 70 alternateStylesheet); 71 return hints; 72 } 73 74 77 protected byte [] getReferenceImageData() { 78 return createBufferedImageData(resolveURL(refImageURI)); 79 } 80 } 81 | Popular Tags |