TextRenderer
Date: 2019-10-22

org.jmol.g3d

## Class TextRenderer

- java.lang.Object
- - org.jmol.g3d.TextRenderer

-     class TextRenderer
      extends java.lang.Object

  implementation for text rendering

  uses java fonts by rendering into an offscreen buffer. strings are rasterized, and 4-bit translucency is stored as byte[] tmap.

  Author:
    Miguel, miguel@jmol.org, Bob Hanson, hansonr@stolaf.edu

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ascent`
    `private int` | `height`
    `private static java.util.Map<Font,java.util.Map<java.lang.String,TextRenderer>>` | `htFont3d`
    `private static java.util.Map<Font,java.util.Map<java.lang.String,TextRenderer>>` | `htFont3dAntialias`
    `private boolean` | `isInvalid`
    `private int` | `mapWidth`
    `private int` | `size`
    `private byte[]` | `tmap`
    `private static byte[]` | `translucency`
    `private int` | `width`
    `private static boolean` | `working`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `TextRenderer(java.lang.String text, Font font3d)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) static void` | `clearFontCache()`
    `private static TextRenderer` | `getPlotText3D(int x, int y, Graphics3D g3d, java.lang.String text, Font font3d, boolean antialias)`
    `(package private) static int` | `plot(int x, int y, int z, int argb, int bgargb, java.lang.String text, Font font3d, Graphics3D g3d, JmolRendererInterface jr, boolean antialias)`
    `private static int` | `plotByCharacter(int x, int y, int z, int argb, int bgargb, java.lang.String text, Font font3d, Graphics3D g3d, JmolRendererInterface jmolRenderer, boolean antialias)`
    `private void` | `setTranslucency(java.lang.String text, Font font3d, Graphics3D g3d)` retrieve grey-scale pixel map from the platform, then round it off

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### height

          private int height

    - #### ascent

          private int ascent

    - #### width

          private int width

    - #### mapWidth

          private int mapWidth

    - #### size

          private int size

    - #### tmap

          private byte[] tmap

    - #### isInvalid

          private boolean isInvalid

    - #### translucency

          private static final byte[] translucency

    - #### working

          private static boolean working

    - #### htFont3d

          private static final java.util.Map<Font,java.util.Map<java.lang.String,TextRenderer>> htFont3d

    - #### htFont3dAntialias

          private static final java.util.Map<Font,java.util.Map<java.lang.String,TextRenderer>> htFont3dAntialias

  - ### Constructor Detail

    - #### TextRenderer

          private TextRenderer(java.lang.String text,
                               Font font3d)

      Parameters:
        `text` -
        `font3d` -

  - ### Method Detail

    - #### clearFontCache

          static void clearFontCache()

    - #### plot

          static int plot(int x,
                          int y,
                          int z,
                          int argb,
                          int bgargb,
                          java.lang.String text,
                          Font font3d,
                          Graphics3D g3d,
                          JmolRendererInterface jr,
                          boolean antialias)

    - #### plotByCharacter

          private static int plotByCharacter(int x,
                                             int y,
                                             int z,
                                             int argb,
                                             int bgargb,
                                             java.lang.String text,
                                             Font font3d,
                                             Graphics3D g3d,
                                             JmolRendererInterface jmolRenderer,
                                             boolean antialias)

    - #### getPlotText3D

          private static TextRenderer getPlotText3D(int x,
                                                    int y,
                                                    Graphics3D g3d,
                                                    java.lang.String text,
                                                    Font font3d,
                                                    boolean antialias)

    - #### setTranslucency

          private void setTranslucency(java.lang.String text,
                                       Font font3d,
                                       Graphics3D g3d)

      retrieve grey-scale pixel map from the platform, then round it off
      Parameters:
        `text` -
        `font3d` -
        `g3d` -