public class AxeTextAnnotation extends Object implements AxeAnnotation
| Modifier and Type | Field and Description |
|---|---|
protected TextCellRenderer |
cellRenderer |
protected Color |
filter |
protected Font |
font |
protected boolean |
horizontal |
protected Coord3d |
pos |
protected Renderer3d |
renderer3d |
protected BufferedImageTexture |
resource |
| Constructor and Description |
|---|
AxeTextAnnotation(String string,
Coord3d pos) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after(com.jogamp.opengl.GL gl) |
protected void |
before(com.jogamp.opengl.GL gl) |
protected void |
callWithAlphaFactor(com.jogamp.opengl.GL gl,
Color c,
float alpha) |
protected org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping |
computeTextureVertex(AxeBox axe,
com.jogamp.opengl.util.texture.Texture texture,
boolean horizontal,
Coord3d pos)
Compute a mapping to ensure :
text cell is vertical
text cell height is 1/6 of axis bounds
text cell image is stretched according to texture ratio (w/h when
horizontal, h/w when vertical layout) and scene scaling ratio (y/x)
TODO : should consider renderer ratio as text is stretch on window resize
|
void |
draw(com.jogamp.opengl.GL gl,
AxeBox axe) |
Renderer3d |
getRenderer3d() |
protected void |
mapTextureHorizontal(com.jogamp.opengl.GL gl,
com.jogamp.opengl.util.texture.TextureCoords coords,
org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping mapping) |
protected void |
mapTextureVertical(com.jogamp.opengl.GL gl,
com.jogamp.opengl.util.texture.TextureCoords coords,
org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping mapping) |
void |
setRenderer3d(Renderer3d renderer3d) |
protected Font font
protected TextCellRenderer cellRenderer
protected BufferedImageTexture resource
protected Coord3d pos
protected Color filter
protected boolean horizontal
protected Renderer3d renderer3d
public void draw(com.jogamp.opengl.GL gl,
AxeBox axe)
draw in interface AxeAnnotationprotected org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping computeTextureVertex(AxeBox axe, com.jogamp.opengl.util.texture.Texture texture, boolean horizontal, Coord3d pos)
axe - texture - horizontal - pos - protected void mapTextureHorizontal(com.jogamp.opengl.GL gl,
com.jogamp.opengl.util.texture.TextureCoords coords,
org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping mapping)
protected void mapTextureVertical(com.jogamp.opengl.GL gl,
com.jogamp.opengl.util.texture.TextureCoords coords,
org.jzy3d.demos.drawing.datebar.AxeTextAnnotation.Mapping mapping)
protected void before(com.jogamp.opengl.GL gl)
protected void after(com.jogamp.opengl.GL gl)
protected void callWithAlphaFactor(com.jogamp.opengl.GL gl,
Color c,
float alpha)
public Renderer3d getRenderer3d()
public void setRenderer3d(Renderer3d renderer3d)
Copyright © 2016. All rights reserved.