1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.scenegraph.g2d;
\r
14 import java.awt.RenderingHints.Key;
\r
16 import com.lowagie.text.pdf.FontMapper;
\r
17 import com.lowagie.text.pdf.PdfContentByte;
\r
18 import com.lowagie.text.pdf.PdfWriter;
\r
21 * @author Toni Kalajainen
\r
23 public final class G2DPDFRenderingHints {
\r
25 /** A rendering hint for storing the ExportPdfWriter object. */
\r
26 public static final Key KEY_EXPORT_PDF_WRITER = new Key(2003) {
\r
28 public boolean isCompatibleValue(Object val) {
\r
29 return val.getClass().getName().equals("org.simantics.export.core.pdf.ExportPdfWriter");
\r
34 * A rendering hint for storing the root PDF ByteContent on which the scene
\r
35 * graph is rendered within a Graphics2D instance.
\r
37 public static final Key KEY_PDF_BYTECONTENT = new Key(2000) {
\r
39 public boolean isCompatibleValue(Object val) {
\r
40 return val instanceof PdfContentByte;
\r
45 * A rendering hint for storing the root PDF writer on which the scene
\r
46 * graph is rendered within a Graphics2D instance.
\r
48 public static final Key KEY_PDF_WRITER = new Key(2001) {
\r
50 public boolean isCompatibleValue(Object val) {
\r
51 return val instanceof PdfWriter;
\r
56 * A rendering hint for storing the root PDF Font Mapper on which the scene
\r
57 * graph is rendered within a Graphics2D instance.
\r
59 public static final Key KEY_PDF_FONTMAPPER = new Key(2002) {
\r
61 public boolean isCompatibleValue(Object val) {
\r
62 return val instanceof FontMapper;
\r