KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > fop > render > ps > EPSTranscoder


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 /* $Id: EPSTranscoder.java 426576 2006-07-28 15:44:37Z jeremias $ */
19  
20 package org.apache.fop.render.ps;
21
22 import org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D;
23 import org.apache.xmlgraphics.java2d.ps.EPSDocumentGraphics2D;
24
25 /**
26  * This class enables to transcode an input to a EPS document.
27  *
28  * <p>Two transcoding hints (<tt>KEY_WIDTH</tt> and
29  * <tt>KEY_HEIGHT</tt>) can be used to respectively specify the image
30  * width and the image height. If only one of these keys is specified,
31  * the transcoder preserves the aspect ratio of the original image.
32  *
33  * <p>The <tt>KEY_BACKGROUND_COLOR</tt> defines the background color
34  * to use for opaque image formats, or the background color that may
35  * be used for image formats that support alpha channel.
36  *
37  * <p>The <tt>KEY_AOI</tt> represents the area of interest to paint
38  * in device space.
39  *
40  * <p>Three additional transcoding hints that act on the SVG
41  * processor can be specified:
42  *
43  * <p><tt>KEY_LANGUAGE</tt> to set the default language to use (may be
44  * used by a &lt;switch> SVG element for example),
45  * <tt>KEY_USER_STYLESHEET_URI</tt> to fix the URI of a user
46  * stylesheet, and <tt>KEY_PIXEL_TO_MM</tt> to specify the pixel to
47  * millimeter conversion factor.
48  *
49  * @author <a HREF="mailto:keiron@aftexsw.com">Keiron Liddle</a>
50  * @version $Id: EPSTranscoder.java 426576 2006-07-28 15:44:37Z jeremias $
51  */

52 public class EPSTranscoder extends AbstractPSTranscoder {
53
54     /**
55      * Constructs a new <tt>EPSPSTranscoder</tt>.
56      */

57     public EPSTranscoder() {
58         super();
59     }
60
61     /** @see AbstractPSTranscoder#createDocumentGraphics2D() */
62     protected AbstractPSDocumentGraphics2D createDocumentGraphics2D() {
63         return new EPSDocumentGraphics2D(false);
64     }
65
66 }
67
Popular Tags