From 8e8507e93dc603ece8417e6931d58dbbd6042201 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 18 Dec 2023 10:27:25 +0100 Subject: UIMediaGrid0{01}: Minor cleanup: Drop unused local Font --- src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java | 8 ++------ src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'src/demos/com') diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java index 212da6199..2183a608c 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid00.java @@ -34,7 +34,6 @@ import java.util.List; import com.jogamp.common.net.Uri; import com.jogamp.graph.curve.Region; import com.jogamp.graph.font.Font; -import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; import com.jogamp.graph.ui.Group; import com.jogamp.graph.ui.Scene; @@ -102,9 +101,6 @@ public class UIMediaGrid00 { } final Vec2i gridDim = new Vec2i(4, mediaFiles.size()); - // final Font fontStatus = FontFactory.get(IOUtil.getResource("fonts/freefont/FreeMono.ttf", FontSetDemos.class.getClassLoader(), FontSetDemos.class).getInputStream(), true); - final Font fontInfo = FontFactory.get(FontFactory.UBUNTU).getDefault(); - final GLProfile reqGLP = GLProfile.get(options.glProfileName); System.err.println("GLProfile: "+reqGLP); @@ -158,7 +154,7 @@ public class UIMediaGrid00 { mediaGrid.setName("MediaGrid"); mediaGrid.setRelayoutOnDirtyShapes(false); } - addMedia(scene, reqGLP, fontInfo, mediaGrid, mediaFiles); + addMedia(scene, reqGLP, mediaGrid, mediaFiles); mediaGrid.validate(reqGLP); System.err.println("MediaGrid "+mediaGrid); System.err.println("MediaGrid "+mediaGrid.getLayout()); @@ -206,7 +202,7 @@ public class UIMediaGrid00 { } - static void addMedia(final Scene scene, final GLProfile glp, final Font font, final Group grid, final List mediaFiles) { + static void addMedia(final Scene scene, final GLProfile glp, final Group grid, final List mediaFiles) { final float zoomSize = 0.95f; for(final Uri medium : mediaFiles) { final GLMediaPlayer mPlayer = GLMediaPlayerFactory.createDefault(); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java index 506797275..52ace18ad 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIMediaGrid01.java @@ -37,7 +37,6 @@ import java.util.List; import com.jogamp.common.net.Uri; import com.jogamp.graph.curve.Region; import com.jogamp.graph.font.Font; -import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; import com.jogamp.graph.ui.Group; import com.jogamp.graph.ui.Scene; @@ -164,9 +163,6 @@ public class UIMediaGrid01 { System.err.println("Media files: Count "+mediaFiles.size()+", grid "+gridDim); } - // final Font fontStatus = FontFactory.get(IOUtil.getResource("fonts/freefont/FreeMono.ttf", FontSetDemos.class.getClassLoader(), FontSetDemos.class).getInputStream(), true); - final Font fontInfo = FontFactory.get(FontFactory.UBUNTU).getDefault(); - final GLProfile reqGLP = GLProfile.get(options.glProfileName); System.err.println("GLProfile: "+reqGLP); @@ -220,7 +216,7 @@ public class UIMediaGrid01 { mediaGrid.setRelayoutOnDirtyShapes(false); } mediaGrid.setName("MediaGrid"); - addMedia(scene, reqGLP, fontInfo, mediaGrid, mediaFiles, boxRatio); + addMedia(scene, reqGLP, mediaGrid, mediaFiles, boxRatio); mediaGrid.validate(reqGLP); System.err.println("MediaGrid "+mediaGrid); System.err.println("MediaGrid "+mediaGrid.getLayout()); @@ -282,7 +278,7 @@ public class UIMediaGrid01 { scene.screenshot(true, scene.nextScreenshotFile(null, UIMediaGrid01.class.getSimpleName(), options.renderModes, caps, "media")); } - static void addMedia(final Scene scene, final GLProfile glp, final Font font, final Group grid, + static void addMedia(final Scene scene, final GLProfile glp, final Group grid, final List mediaFiles, final float defRatio) { final float zoomSize = 0.95f; for(final Uri medium : mediaFiles) { -- cgit v1.2.3