]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DPDFRenderingHints.java
Added cleaner rendering hint to decide text rendering mode: text/paths
[simantics/platform.git] / bundles / org.simantics.scenegraph / src / org / simantics / scenegraph / g2d / G2DPDFRenderingHints.java
index ffdcc32ab31a09e8316b180b592e076ab7b31f38..0b9a57474057a41247b69c82e7fbf9e9846ab628 100644 (file)
@@ -62,6 +62,29 @@ public final class G2DPDFRenderingHints {
             return val instanceof FontMapper;
         }
     };
-    
+
+    /**
+     * If this hint is not specified, the default interpretation should be
+     * {@value #AS_PATHS}.
+     * 
+     * @since 1.31.0
+     */
+    public static enum TextRenderingMode {
+        AS_PATHS,
+        AS_TEXT
+    }
+
+    /**
+     * A rendering hint for telling text rendering Simantics G2D scene graph node
+     * implementations how to render the text: as text or paths.
+     * 
+     * @since 1.31.0
+     */
+    public static final Key KEY_TEXT_RENDERING_MODE = new Key(2004) {
+        @Override
+        public boolean isCompatibleValue(Object val) {
+            return val instanceof TextRenderingMode;
+        }
+    };
 
 }
\ No newline at end of file