--- /dev/null
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.scenegraph.g2d;\r
+\r
+import java.awt.RenderingHints.Key;\r
+\r
+import com.lowagie.text.pdf.FontMapper;\r
+import com.lowagie.text.pdf.PdfContentByte;\r
+import com.lowagie.text.pdf.PdfWriter;\r
+\r
+/**\r
+ * @author Toni Kalajainen\r
+ */\r
+public final class G2DPDFRenderingHints {\r
+\r
+ /** A rendering hint for storing the ExportPdfWriter object. */\r
+ public static final Key KEY_EXPORT_PDF_WRITER = new Key(2003) {\r
+ @Override\r
+ public boolean isCompatibleValue(Object val) {\r
+ return val.getClass().getName().equals("org.simantics.export.core.pdf.ExportPdfWriter");\r
+ }\r
+ };\r
+ \r
+ /**\r
+ * A rendering hint for storing the root PDF ByteContent on which the scene\r
+ * graph is rendered within a Graphics2D instance.\r
+ */\r
+ public static final Key KEY_PDF_BYTECONTENT = new Key(2000) {\r
+ @Override\r
+ public boolean isCompatibleValue(Object val) {\r
+ return val instanceof PdfContentByte;\r
+ }\r
+ };\r
+\r
+ /**\r
+ * A rendering hint for storing the root PDF writer on which the scene\r
+ * graph is rendered within a Graphics2D instance.\r
+ */\r
+ public static final Key KEY_PDF_WRITER = new Key(2001) {\r
+ @Override\r
+ public boolean isCompatibleValue(Object val) {\r
+ return val instanceof PdfWriter;\r
+ }\r
+ };\r
+ \r
+ /**\r
+ * A rendering hint for storing the root PDF Font Mapper on which the scene\r
+ * graph is rendered within a Graphics2D instance.\r
+ */\r
+ public static final Key KEY_PDF_FONTMAPPER = new Key(2002) {\r
+ @Override\r
+ public boolean isCompatibleValue(Object val) {\r
+ return val instanceof FontMapper;\r
+ }\r
+ };\r
+ \r
+\r
+}
\ No newline at end of file