diff options
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/Scene.java')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/Scene.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java index 7f47b2d98..9ebacf2ec 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java +++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java @@ -28,6 +28,7 @@ package com.jogamp.graph.ui; import java.io.File; +import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; @@ -53,6 +54,8 @@ import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.RenderState; +import com.jogamp.graph.font.Font; +import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.ui.Shape.Visitor2; import com.jogamp.math.FloatUtil; import com.jogamp.math.Matrix4f; @@ -127,6 +130,25 @@ public final class Scene implements Container, GLEventListener { return FloatUtil.getZBufferEpsilon(zBits, setup.getSceneDist(), setup.getZNear()); } + /** Returns {@link FontFactory#getDefault()} font or null if n/a */ + public static Font getDefaultFont() { + try { + return FontFactory.getDefault().getDefault(); + } catch(final IOException ioe) { + ioe.printStackTrace(); + return null; + } + } + /** Returns the default symbols font or null if n/a */ + public static Font getSymbolsFont() { + try { + return FontFactory.get(FontFactory.SYMBOLS).getDefault(); + } catch(final IOException ioe) { + ioe.printStackTrace(); + return null; + } + } + private static final boolean DEBUG = false; private final List<Shape> shapes = new CopyOnWriteArrayList<Shape>(); |