aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/awt/GLCanvas.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2023-09-26 05:34:24 +0200
committerSven Gothel <sgothel@jausoft.com>2023-09-26 05:34:24 +0200
commit893903d2ece1193aa87257bd6162754dfb89f9f9 (patch)
treec3b96a3a489f3442000aac8aef2c4350ef2529f5 /src/jogl/classes/com/jogamp/opengl/awt/GLCanvas.java
parent3025466c5c79ffb06c761dbfa380e643d562994a (diff)
GraphUI Button: Support toggle'ed labels and fixed font size scaling for symbols (see setFixedLabelSize()),
This allows convenient instantiation of a Button changing its text (or symbol) when toggled, e.g.: UISceneDemo03: + final Button button = new Button(options.renderModes, fontSymbols, + fontSymbols.getUTF16String("play_arrow"), fontSymbols.getUTF16String("pause"), + buttonWidth, buttonHeight, buttonZOffset); + button.setSpacing(symSpacing, fixedSymSize); +++ setFixedLabelSize(..): Sets fixed label font size clipped to range [0 .. 1], defaults to {@code 0, 0}. Use {@code w=0, h=1} when using single symbols from fixed sized symbol fonts! Use {@link #setSpacing(Vec2f, Vec2f)} to also set spacing. The fixed label font size is used as the denominator when scaling.{@code max(fixedLabelSize, fontLabelSize)}, hence reasonable values are either {@code 1} to enable using the given font-size for the axis or {@code 0} to scale up/down the font to match the button box less spacing for the axis.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/awt/GLCanvas.java')
0 files changed, 0 insertions, 0 deletions