Package org.apache.batik.transcoder

Examples of org.apache.batik.transcoder.SVGAbstractTranscoder.addTranscodingHint()


      /*
       * If the raster image height is not provided (using the
       * KEY_HEIGHT), the transcoder will compute the raster image height
       * by keeping the aspect ratio of the SVG document.
       */
      transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH,
          width);
    }
    transcoder.transcode(input, transOutput);

    return stream;
View Full Code Here


    case PNG:
      transcoder = new PNGTranscoder();
      break;
    case JPEG:
      transcoder = new JPEGTranscoder();
      transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,
          new Float(0.9));
      break;
    case PDF:
      transcoder = new PDFTranscoder();
      break;
View Full Code Here

      /*
       * If the raster image height is not provided (using the
       * KEY_HEIGHT), the transcoder will compute the raster image height
       * by keeping the aspect ratio of the SVG document.
       */
      transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH,
          width);
    }

    if (width == null && scale != null && scale != 0.00) {
      Float svgWidth = getWidthFromSvg(svg);
View Full Code Here

    if (width == null && scale != null && scale != 0.00) {
      Float svgWidth = getWidthFromSvg(svg);
      // calculate width from svg
      if (svgWidth != null) {
        transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH,
            svgWidth * scale);
      }
    }

    transcoder.transcode(input, transOutput);
View Full Code Here

    case PNG:
      transcoder = new PNGTranscoder();
      break;
    case JPEG:
      transcoder = new JPEGTranscoder();
      transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY,
          new Float(0.9));
      break;
    case PDF:
      transcoder = new PDFTranscoder();
      break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.