]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DPDFRenderingHints.java
G2DParentNode handles "undefined" child bounds separately
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DPDFRenderingHints.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.scenegraph.g2d;
13
14 import java.awt.RenderingHints.Key;
15
16 import com.lowagie.text.pdf.FontMapper;
17 import com.lowagie.text.pdf.PdfContentByte;
18 import com.lowagie.text.pdf.PdfWriter;
19
20 /**
21  * @author Toni Kalajainen
22  */
23 public final class G2DPDFRenderingHints {
24
25     /** A rendering hint for storing the ExportPdfWriter object. */
26     public static final Key KEY_EXPORT_PDF_WRITER = new Key(2003) {
27         @Override
28         public boolean isCompatibleValue(Object val) {
29             return val.getClass().getName().equals("org.simantics.export.core.pdf.ExportPdfWriter");
30         }
31     };
32         
33     /**
34      * A rendering hint for storing the root PDF ByteContent on which the scene
35      * graph is rendered within a Graphics2D instance.
36      */
37     public static final Key KEY_PDF_BYTECONTENT = new Key(2000) {
38         @Override
39         public boolean isCompatibleValue(Object val) {
40             return val instanceof PdfContentByte;
41         }
42     };
43
44     /**
45      * A rendering hint for storing the root PDF writer on which the scene
46      * graph is rendered within a Graphics2D instance.
47      */
48     public static final Key KEY_PDF_WRITER = new Key(2001) {
49         @Override
50         public boolean isCompatibleValue(Object val) {
51             return val instanceof PdfWriter;
52         }
53     };
54     
55     /**
56      * A rendering hint for storing the root PDF Font Mapper on which the scene
57      * graph is rendered within a Graphics2D instance.
58      */
59     public static final Key KEY_PDF_FONTMAPPER = new Key(2002) {
60         @Override
61         public boolean isCompatibleValue(Object val) {
62             return val instanceof FontMapper;
63         }
64     };
65
66 }