You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EPSTranscoder.java 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Copyright 1999-2004,2006 The Apache Software Foundation.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /* $Id$ */
  17. package org.apache.fop.render.ps;
  18. import org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D;
  19. import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
  20. /**
  21. * This class enables to transcode an input to a EPS document.
  22. *
  23. * <p>Two transcoding hints (<tt>KEY_WIDTH</tt> and
  24. * <tt>KEY_HEIGHT</tt>) can be used to respectively specify the image
  25. * width and the image height. If only one of these keys is specified,
  26. * the transcoder preserves the aspect ratio of the original image.
  27. *
  28. * <p>The <tt>KEY_BACKGROUND_COLOR</tt> defines the background color
  29. * to use for opaque image formats, or the background color that may
  30. * be used for image formats that support alpha channel.
  31. *
  32. * <p>The <tt>KEY_AOI</tt> represents the area of interest to paint
  33. * in device space.
  34. *
  35. * <p>Three additional transcoding hints that act on the SVG
  36. * processor can be specified:
  37. *
  38. * <p><tt>KEY_LANGUAGE</tt> to set the default language to use (may be
  39. * used by a &lt;switch> SVG element for example),
  40. * <tt>KEY_USER_STYLESHEET_URI</tt> to fix the URI of a user
  41. * stylesheet, and <tt>KEY_PIXEL_TO_MM</tt> to specify the pixel to
  42. * millimeter conversion factor.
  43. *
  44. * @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
  45. * @version $Id$
  46. */
  47. public class EPSTranscoder extends AbstractPSTranscoder {
  48. /**
  49. * Constructs a new <tt>EPSPSTranscoder</tt>.
  50. */
  51. public EPSTranscoder() {
  52. super();
  53. }
  54. /** @see AbstractPSTranscoder#createDocumentGraphics2D() */
  55. protected AbstractPSDocumentGraphics2D createDocumentGraphics2D() {
  56. return new EPSDocumentGraphics2D(false);
  57. }
  58. }