1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.scenegraph.g2d;
14 import java.awt.RenderingHints.Key;
16 import com.lowagie.text.pdf.FontMapper;
17 import com.lowagie.text.pdf.PdfContentByte;
18 import com.lowagie.text.pdf.PdfWriter;
21 * @author Toni Kalajainen
23 public final class G2DPDFRenderingHints {
25 /** A rendering hint for storing the ExportPdfWriter object. */
26 public static final Key KEY_EXPORT_PDF_WRITER = new Key(2003) {
28 public boolean isCompatibleValue(Object val) {
29 return val.getClass().getName().equals("org.simantics.export.core.pdf.ExportPdfWriter");
34 * A rendering hint for storing the root PDF ByteContent on which the scene
35 * graph is rendered within a Graphics2D instance.
37 public static final Key KEY_PDF_BYTECONTENT = new Key(2000) {
39 public boolean isCompatibleValue(Object val) {
40 return val instanceof PdfContentByte;
45 * A rendering hint for storing the root PDF writer on which the scene
46 * graph is rendered within a Graphics2D instance.
48 public static final Key KEY_PDF_WRITER = new Key(2001) {
50 public boolean isCompatibleValue(Object val) {
51 return val instanceof PdfWriter;
56 * A rendering hint for storing the root PDF Font Mapper on which the scene
57 * graph is rendered within a Graphics2D instance.
59 public static final Key KEY_PDF_FONTMAPPER = new Key(2002) {
61 public boolean isCompatibleValue(Object val) {
62 return val instanceof FontMapper;