X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scenegraph%2Fsrc%2Forg%2Fsimantics%2Fscenegraph%2Fg2d%2FG2DRenderingHints.java;h=ff68dac5a692829ad157dc4180091dd9a3abb31a;hb=e75a2a68817ab088db4f84419c2e988ec83fbd39;hp=0f1803e2d64ee6d27d74695cab015a62fa658b54;hpb=2318f67fbf458ee97fd438678be1bc5a636c9fa7;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java index 0f1803e2d..ff68dac5a 100644 --- a/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java +++ b/bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DRenderingHints.java @@ -69,4 +69,40 @@ public final class G2DRenderingHints { } }; + /** + * 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; + } + }; + + /** + * Instead of rendering SVGNode using SVG Salamander pass it to G2D as SVGPassthruShape in String format. + * + * @since 1.31.0 + */ + public static final Key KEY_SVG_PASSTHRU = new Key(2005) { + @Override + public boolean isCompatibleValue(Object val) { + return val instanceof Boolean; + } + }; + } \ No newline at end of file