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

public class DrawableTextWrapper extends Drawable
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 Details

    • txt

      protected String txt
    • position

      protected Coord3d position
    • halign

      protected Horizontal halign
    • valign

      protected Vertical valign
    • color

      protected Color color
    • screenOffset

      protected Coord2d screenOffset
    • sceneOffset

      protected Coord3d sceneOffset
    • rotation

      protected float rotation
    • renderer

      protected ITextRenderer renderer
    • axisLayout

      protected AxisLayout axisLayout
    • defaultFont

      protected Font defaultFont
    • pointDisplayed

      protected boolean pointDisplayed
    • point

      protected Point point
    • flipHorizontalAlignWithViewpoint

      protected boolean flipHorizontalAlignWithViewpoint
  • Constructor Details

  • Method Details

    • draw

      public void draw(IPainter painter)
      Description copied from class: Drawable
      Call OpenGL2 routines for rendering the object.
      Specified by:
      draw in interface IGLRenderer
      Specified by:
      draw in class Drawable
    • flipHorizontalAlignIfEnabled

      public Horizontal flipHorizontalAlignIfEnabled(IPainter painter)
    • getBounds

      public BoundingBox3d getBounds()
      Description copied from class: Drawable
      Return the BoundingBox of this object.
      Overrides:
      getBounds in class Drawable
      Returns:
      a bounding box
    • configure

      public void configure(String txt, Coord3d position, Color color, Horizontal ha, Vertical va)
    • getText

      public String getText()
    • setText

      public void setText(String txt)
    • setPosition

      public void setPosition(Coord3d position)
    • getPosition

      public Coord3d getPosition()
    • setColor

      public void setColor(Color color)
    • isFlipHorizontalAlignWithViewpoint

      public boolean isFlipHorizontalAlignWithViewpoint()
    • setFlipHorizontalAlignWithViewpoint

      public void setFlipHorizontalAlignWithViewpoint(boolean flipHorizontalAlignWithViewpoint)
    • getHalign

      public Horizontal getHalign()
    • setHalign

      public void setHalign(Horizontal halign)
    • getValign

      public Vertical getValign()
    • setValign

      public void setValign(Vertical valign)
    • getScreenOffset

      public Coord2d getScreenOffset()
    • setScreenOffset

      public void setScreenOffset(Coord2d screenOffset)
    • getSceneOffset

      public Coord3d getSceneOffset()
    • setSceneOffset

      public void setSceneOffset(Coord3d sceneOffset)
    • getRotation

      public float getRotation()
    • setRotation

      public void setRotation(float rotation)
    • getAxisLayout

      public AxisLayout getAxisLayout()
    • setAxisLayout

      public 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. To for this drawable text to use a given font, set this to null and configure setDefaultFont(Font)
    • getDefaultFont

      public Font getDefaultFont()
    • setDefaultFont

      public void setDefaultFont(Font defaultFont)
    • getPoint

      public Point getPoint()
    • isPointDisplayed

      public boolean isPointDisplayed()
    • setPointDisplayed

      public void setPointDisplayed(boolean pointDisplayed)
    • toString

      public String toString()
      Overrides:
      toString in class Drawable
    • applyGeometryTransform

      public void applyGeometryTransform(Transform transform)
      Specified by:
      applyGeometryTransform in class Drawable
    • updateBounds

      public void updateBounds()
      Specified by:
      updateBounds in class Drawable