]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java
00c7a6d0c8c516ead3e619f6edc8b8bb0070c9db
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DRenderingHints.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.Component;
15 import java.awt.RenderingHints.Key;
16 import java.awt.geom.Rectangle2D;
17
18 /**
19  * @author Tuukka Lehtonen
20  * See {@link G2DPDFRenderingHints}
21  */
22 public final class G2DRenderingHints {
23
24     /**
25      * A rendering hint for storing the boundaries of the control area within a
26      * Graphics2D instance.
27      */
28     public static final Key KEY_CONTROL_BOUNDS = new Key(1000) {
29         @Override
30         public boolean isCompatibleValue(Object val) {
31             return val instanceof Rectangle2D;
32         }
33     };
34
35     /**
36      * A rendering hint for storing the root AWT Component on which the scene
37      * graph is rendered within a Graphics2D instance.
38      */
39     public static final Key KEY_COMPONENT      = new Key(1001) {
40         @Override
41         public boolean isCompatibleValue(Object val) {
42             return val instanceof Component;
43         }
44     };
45
46 }