Package org.jzy3d.plot3d.text.drawable
Class DrawableTextWrapper
java.lang.Object
org.jzy3d.plot3d.primitives.Drawable
org.jzy3d.plot3d.text.drawable.DrawableTextWrapper
- All Implemented Interfaces:
IGLRenderer
,ISortableDraw
- Direct Known Subclasses:
DrawableText
,DrawableTextBillboard
A
DrawableTextWrapper
wraps any text rendered by an ITextRenderer
into an
Drawable
, meaning it can be injected in the scene graph, and be transformed.- Author:
- Martin Pernollet
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AxisLayout
protected Color
protected Font
protected boolean
protected Horizontal
protected Point
protected boolean
protected Coord3d
protected ITextRenderer
protected float
protected Coord3d
protected Coord2d
protected String
protected Vertical
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
Constructor Summary
ConstructorsConstructorDescriptionDrawableTextWrapper
(String txt, Coord3d position, Color color, ITextRenderer renderer) DrawableTextWrapper
(ITextRenderer renderer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyGeometryTransform
(Transform transform) void
void
Call OpenGL2 routines for rendering the object.flipHorizontalAlignIfEnabled
(IPainter painter) Return the BoundingBox of this object.getPoint()
float
getText()
boolean
boolean
void
setAxisLayout
(AxisLayout axisLayout) The axis layout acts as main font provider, to allow all text renderer to use the same current font than the one selected for axis and colorbar texts.void
void
setDefaultFont
(Font defaultFont) void
setFlipHorizontalAlignWithViewpoint
(boolean flipHorizontalAlignWithViewpoint) void
setHalign
(Horizontal halign) void
setPointDisplayed
(boolean pointDisplayed) void
setPosition
(Coord3d position) void
setRotation
(float rotation) void
setSceneOffset
(Coord3d sceneOffset) void
setScreenOffset
(Coord2d screenOffset) void
void
toString()
void
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doDrawBoundsIfDisplayed, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString
-
Field Details
-
txt
-
position
-
halign
-
valign
-
color
-
screenOffset
-
sceneOffset
-
rotation
protected float rotation -
renderer
-
axisLayout
-
defaultFont
-
pointDisplayed
protected boolean pointDisplayed -
point
-
flipHorizontalAlignWithViewpoint
protected boolean flipHorizontalAlignWithViewpoint
-
-
Constructor Details
-
DrawableTextWrapper
-
DrawableTextWrapper
-
-
Method Details
-
draw
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
flipHorizontalAlignIfEnabled
-
getBounds
Description copied from class:Drawable
Return the BoundingBox of this object. -
configure
-
getText
-
setText
-
setPosition
-
getPosition
-
setColor
-
isFlipHorizontalAlignWithViewpoint
public boolean isFlipHorizontalAlignWithViewpoint() -
setFlipHorizontalAlignWithViewpoint
public void setFlipHorizontalAlignWithViewpoint(boolean flipHorizontalAlignWithViewpoint) -
getHalign
-
setHalign
-
getValign
-
setValign
-
getScreenOffset
-
setScreenOffset
-
getSceneOffset
-
setSceneOffset
-
getRotation
public float getRotation() -
setRotation
public void setRotation(float rotation) -
getAxisLayout
-
setAxisLayout
The axis layout acts as main font provider, to allow all text renderer to use the same current font than the one selected for axis and colorbar texts. To for this drawable text to use a given font, set this to null and configuresetDefaultFont(Font)
-
getDefaultFont
-
setDefaultFont
-
getPoint
-
isPointDisplayed
public boolean isPointDisplayed() -
setPointDisplayed
public void setPointDisplayed(boolean pointDisplayed) -
toString
-
applyGeometryTransform
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()- Specified by:
updateBounds
in classDrawable
-