Package org.jzy3d.plot3d.text.renderers
Class TextBitmapRenderer
- java.lang.Object
-
- org.jzy3d.plot3d.text.AbstractTextRenderer
-
- org.jzy3d.plot3d.text.renderers.TextBitmapRenderer
-
- All Implemented Interfaces:
ITextRenderer
- Direct Known Subclasses:
AxisBox2d.RotatedTextBitmapRenderer
public class TextBitmapRenderer extends AbstractTextRenderer implements ITextRenderer
TheITextRenderer
is able to draw basic OpenGL font as supported byIPainter.glutBitmapString(Font, String, Coord3d, Color)
. Concrete painters might rely on- EmulGL : AWT Font rendering by
Graphics2D.drawString(String, float, float)
by using jGL AWT helpers. - Native : GLUT.glutBitmapString(Font, String, Coord3d, Color)
-
-
Field Summary
Fields Modifier and Type Field Description protected TextLayout
layout
protected static org.apache.log4j.Logger
LOGGER
-
Fields inherited from class org.jzy3d.plot3d.text.AbstractTextRenderer
NO_ROTATION, NO_SCENE_OFFSET, NO_SCREEN_OFFSET, spaceTransformer
-
-
Constructor Summary
Constructors Constructor Description TextBitmapRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BoundingBox3d
computeTextBounds(IPainter painter, Font font, Coord3d posScreenShifted, float strlen)
BoundingBox3d
drawText(IPainter painter, Font font, String text, Coord3d position, float rotation, Horizontal halign, Vertical valign, Color color, Coord2d screenOffset, Coord3d sceneOffset)
Draw a string at the specified position and return the 3d volume occupied by the string according to the current Camera configuration.protected void
glRasterPos(IPainter painter, Coord3d sceneOffset, Coord3d screenPositionAligned3d)
Left as a helper for subclasses.protected Coord3d
to3D(IPainter painter, Coord3d screen)
Convert a 2D screen position to 3D world coordinate-
Methods inherited from class org.jzy3d.plot3d.text.AbstractTextRenderer
drawText, drawText, drawText, drawText, drawText, getSpaceTransformer, setSpaceTransformer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jzy3d.plot3d.text.ITextRenderer
drawText, drawText, drawText, drawText, drawText, getSpaceTransformer, setSpaceTransformer
-
-
-
-
Field Detail
-
LOGGER
protected static org.apache.log4j.Logger LOGGER
-
layout
protected TextLayout layout
-
-
Method Detail
-
drawText
public BoundingBox3d drawText(IPainter painter, Font font, String text, Coord3d position, float rotation, Horizontal halign, Vertical valign, Color color, Coord2d screenOffset, Coord3d sceneOffset)
Draw a string at the specified position and return the 3d volume occupied by the string according to the current Camera configuration.- Specified by:
drawText
in interfaceITextRenderer
-
glRasterPos
protected void glRasterPos(IPainter painter, Coord3d sceneOffset, Coord3d screenPositionAligned3d)
Left as a helper for subclasses. TODO delete me and subclass
-
to3D
protected Coord3d to3D(IPainter painter, Coord3d screen)
Convert a 2D screen position to 3D world coordinate
-
computeTextBounds
protected BoundingBox3d computeTextBounds(IPainter painter, Font font, Coord3d posScreenShifted, float strlen)
-
-