Package org.jzy3d.plot3d.text.overlay
Class AWTTextOverlay
- java.lang.Object
-
- org.jzy3d.plot3d.text.overlay.AWTTextOverlay
-
- All Implemented Interfaces:
AWTRenderer2d
- Direct Known Subclasses:
SwingTextOverlay
public class AWTTextOverlay extends Object implements AWTRenderer2d
Highly experimental text renderer. TheAWTTextOverlay
allows computing the 2d position of a text in the window, according to its required position in the 3d environment (using appenText method). As a 2nd pass, it might be rendered into a javaGraphics
context. The interesting thing, compared to the currently usedTextBitmapRenderer
, is that the user may select any java Font, whereas theTextBitmapRenderer
only relies on Helvetica font provided by opengl. Actually no need to urgently correct these following todo: due to the problems related to post/pre rendering (blinking), this text Renderer is not used. An alternative would be to render the java text could be renderer into a Java Image that could in turn be rendered by opengl. // TODO: Verify alignement constants // TODO: Complete text renderer: select font, size, zoom // TODO: there may be a bug of non-rendering without resizing at init -> check that // TODO: the 1<->N relation TextRenderer<->Canvas won't work because TextRenderer has only one target Component.
-
-
Constructor Summary
Constructors Constructor Description AWTTextOverlay(ICanvas canvas)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendText(IPainter painter, String s, Coord3d position, Horizontal halign, Vertical valign, Color color)
void
dispose()
protected void
init(ICanvas canvas)
protected void
initComponent(Component c)
void
paint(Graphics g, int canvasWidth, int canvasHeight)
-
-
-
Constructor Detail
-
AWTTextOverlay
public AWTTextOverlay(ICanvas canvas)
-
-
Method Detail
-
init
protected void init(ICanvas canvas)
-
initComponent
protected void initComponent(Component c)
-
dispose
public void dispose()
-
appendText
public void appendText(IPainter painter, String s, Coord3d position, Horizontal halign, Vertical valign, Color color)
-
paint
public void paint(Graphics g, int canvasWidth, int canvasHeight)
- Specified by:
paint
in interfaceAWTRenderer2d
-
-