Class TextRendering3D.Style

java.lang.Object
edu.cnu.mdi.mdi3D.panel.TextRendering3D.Style
Enclosing class:
TextRendering3D

public static final class TextRendering3D.Style extends Object
Immutable drawing style for one text pass.
  • Field Details

    • foreground

      public final Color foreground
      Foreground text color.
    • shadow

      public final Color shadow
      Shadow/outline color. If null, no shadow/outline is drawn.
    • shadowOffset

      public final int shadowOffset
      Pixel offset used for shadow drawing.
    • outline

      public final boolean outline
      If true, draw a four-direction outline instead of a single shadow.
    • clipToViewport

      public final boolean clipToViewport
      If true, skip labels projected outside the viewport or behind camera.
  • Constructor Details

    • Style

      public Style(Color foreground, Color shadow, int shadowOffset, boolean outline, boolean clipToViewport)
      Create a style.
      Parameters:
      foreground - foreground color; if null, white is used
      shadow - shadow or outline color; null disables it
      shadowOffset - shadow/outline offset in pixels, normally 1 or 2
      outline - true for four-direction outline, false for one shadow
      clipToViewport - true to skip off-screen or behind-camera labels
  • Method Details

    • label

      public static TextRendering3D.Style label()
      Returns:
      a general-purpose label style
    • axisTitle

      public static TextRendering3D.Style axisTitle()
      Returns:
      an axis-title style suitable for light and dark data regions
    • tickLabel

      public static TextRendering3D.Style tickLabel()
      Returns:
      a tick-label style suitable for light plot backgrounds