public class DeclutteringTextRenderer
extends java.lang.Object
GeographicTextRenderer
that participates in globe text decluttering. See ClutterFilter
for more information on decluttering.Modifier and Type | Field and Description |
---|---|
protected static java.awt.Color |
DEFAULT_COLOR |
protected static java.awt.Font |
DEFAULT_FONT |
protected GLU |
glu |
protected boolean |
hasJOGLv111Bug |
Constructor and Description |
---|
DeclutteringTextRenderer() |
Modifier and Type | Method and Description |
---|---|
protected java.awt.Color |
applyOpacity(java.awt.Color color,
double opacity) |
protected void |
beginRendering(DrawContext dc) |
protected java.awt.geom.Point2D.Float |
computeDrawPoint(java.awt.geom.Rectangle2D rect,
Vec4 screenPoint)
Computes the final draw point for the given rectangle lower left corner and target screen point.
|
protected java.awt.geom.Rectangle2D |
computeTextBounds(DrawContext dc,
DeclutterableText text) |
protected Vec4 |
drawText(DrawContext dc,
DeclutterableText uText,
double scale,
double opacity) |
protected void |
endRendering(DrawContext dc) |
java.awt.Font |
getDefaultFont() |
TextRenderer |
getTextRenderer(DrawContext dc,
java.awt.Font font)
Returns either a cached or new text renderer for a specified font.
|
protected void |
handleTextRendererExceptions(java.lang.Exception e) |
protected static boolean |
isTextValid(GeographicText text,
boolean checkPosition) |
void |
render(DrawContext dc,
java.lang.Iterable<? extends GeographicText> textIterable)
Adds ordered renderables to the ordered renderable list.
|
protected void |
setDepthFunc(DrawContext dc,
Vec4 screenPoint) |
protected static final java.awt.Color DEFAULT_COLOR
protected static final java.awt.Font DEFAULT_FONT
protected final GLU glu
protected boolean hasJOGLv111Bug
protected java.awt.Color applyOpacity(java.awt.Color color, double opacity)
protected void beginRendering(DrawContext dc)
protected java.awt.geom.Point2D.Float computeDrawPoint(java.awt.geom.Rectangle2D rect, Vec4 screenPoint)
null
the text will not be drawn.rect
- the text rectangle to draw.screenPoint
- the projected screen point the text relates to.null
.protected java.awt.geom.Rectangle2D computeTextBounds(DrawContext dc, DeclutterableText text) throws java.lang.Exception
java.lang.Exception
protected Vec4 drawText(DrawContext dc, DeclutterableText uText, double scale, double opacity) throws java.lang.Exception
java.lang.Exception
protected void endRendering(DrawContext dc)
public java.awt.Font getDefaultFont()
public TextRenderer getTextRenderer(DrawContext dc, java.awt.Font font)
dc
- the current draw context.font
- the text font.protected void handleTextRendererExceptions(java.lang.Exception e) throws java.lang.Exception
java.lang.Exception
protected static boolean isTextValid(GeographicText text, boolean checkPosition)
public void render(DrawContext dc, java.lang.Iterable<? extends GeographicText> textIterable)
dc
- the current draw context.textIterable
- a collection of text shapes to add to the ordered-renderable list.protected void setDepthFunc(DrawContext dc, Vec4 screenPoint)