aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-26 06:19:11 +0200
committerSven Gothel <[email protected]>2023-09-26 06:19:11 +0200
commitc5fde40428937c08486226e9d4488a0ca1a00377 (patch)
tree73614fa0abec309d1e0ebf924740709cd47966bf /src/demos
parente0664688e45c07b8bc082f960b6790e592dd2034 (diff)
GraphUI Demos: Minor refinements..
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java8
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
index 36f7eb90e..0e7590995 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/FontView01.java
@@ -244,7 +244,7 @@ public class FontView01 {
glyphInfo.validate(d.getGL().getGL2ES2()); // avoid group re-validate
// System.err.println("GlyphInfo "+glyphInfo.getBounds());
if( doScreenshot ) {
- printScreenOnGLThread(scene, window.getChosenGLCapabilities(), font, gs.getGlyph().getID());
+ printScreenOnGLThread(scene, window.getChosenGLCapabilities(), font, gs.getGlyph().getCodepoint());
}
return true;
});
@@ -405,13 +405,13 @@ public class FontView01 {
System.err.println("scale sx "+sx+", sy "+sy+", sxy "+sxy);
mainGrid.scale(sxy, sxy, 1f).moveTo(sceneBox.getLow());
}
- printScreenOnGLThread(scene, window.getChosenGLCapabilities(), font, 0);
+ printScreenOnGLThread(scene, window.getChosenGLCapabilities(), font, gridDim.contourChars.get(gridDim.start));
// stay open ..
}
- static void printScreenOnGLThread(final Scene scene, final GLCapabilitiesImmutable caps, final Font font, final int glyphID) {
+ static void printScreenOnGLThread(final Scene scene, final GLCapabilitiesImmutable caps, final Font font, final int codepoint) {
final String fn = font.getFullFamilyName().replace(' ', '_').replace('-', '_');
- scene.screenshot(true, scene.nextScreenshotFile(null, FontView01.class.getSimpleName(), options.renderModes, caps, fn+"_gid"+glyphID));
+ scene.screenshot(true, scene.nextScreenshotFile(null, FontView01.class.getSimpleName(), options.renderModes, caps, fn+"_cp"+Integer.toHexString(codepoint)));
}
static class GridDim {
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java b/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
index 08fa684f4..fc3b75009 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
@@ -77,7 +77,7 @@ public class Tooltips {
final Label label = (Label)shapeEvent.shape;
final AABBox textDim = label.getBounds();
final float l_sxy = sceneHeightScale * sceneDim.getHeight() / textDim.getHeight(); // text width independent
- buttonLabel = (Button) new Button(renderModes, label.getFont(), label.getText(), textDim.getWidth(), textDim.getHeight(), zEps)
+ buttonLabel = (Button) new Button(renderModes, label.getFont(), label.getText(), textDim.getWidth()+3, textDim.getHeight(), zEps)
.setPerp().scale(l_sxy, l_sxy, 1).move(0, 0, 10*zEps)
.setColor(0.97f, 0.97f, 0.97f, 0.92f).setBorder(0.05f).setBorderColor(0, 0, 0, 1)
.setInteractive(false);