Package edu.cnu.mdi.mdi3D.panel
Class TextRendering3D.Style
java.lang.Object
edu.cnu.mdi.mdi3D.panel.TextRendering3D.Style
- Enclosing class:
TextRendering3D
Immutable drawing style for one text pass.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanIf true, skip labels projected outside the viewport or behind camera.final ColorForeground text color.final booleanIf true, draw a four-direction outline instead of a single shadow.final ColorShadow/outline color.final intPixel offset used for shadow drawing. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TextRendering3D.Stylestatic TextRendering3D.Stylelabel()static TextRendering3D.Style
-
Field Details
-
foreground
Foreground text color. -
shadow
Shadow/outline color. Ifnull, no shadow/outline is drawn. -
shadowOffset
public final int shadowOffsetPixel offset used for shadow drawing. -
outline
public final boolean outlineIf true, draw a four-direction outline instead of a single shadow. -
clipToViewport
public final boolean clipToViewportIf 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; ifnull, white is usedshadow- shadow or outline color;nulldisables itshadowOffset- shadow/outline offset in pixels, normally 1 or 2outline- true for four-direction outline, false for one shadowclipToViewport- true to skip off-screen or behind-camera labels
-
-
Method Details
-
label
- Returns:
- a general-purpose label style
-
axisTitle
- Returns:
- an axis-title style suitable for light and dark data regions
-
tickLabel
- Returns:
- a tick-label style suitable for light plot backgrounds
-