public static class ScilabLikePlot2D.Plot2DDrawer extends java.lang.Object implements Drawer
Constructor and Description |
---|
ScilabLikePlot2D.Plot2DDrawer(Canvas canvas,
MouseRotationAdapter mra)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(DrawingTools drawingTools)
Ask this drawer to draw with the given drawing tools.
|
float[] |
getSinData(float theta,
int density,
float bound)
Return a float array filled with some "y = sin(theta * x)" data.
|
TextureDrawer |
getSpriteDrawer()
Return a sprite drawer.
|
RulerModel |
getXRulerModel()
Return the X ruler model.
|
RulerModel |
getYRulerModel()
Return the Y ruler model.
|
boolean |
is2DView() |
public ScilabLikePlot2D.Plot2DDrawer(Canvas canvas, MouseRotationAdapter mra)
canvas
- parent Canvas
mra
- a MouseRotationAdapter
to add some interactivity.public void draw(DrawingTools drawingTools)
Drawer
public boolean is2DView()
public float[] getSinData(float theta, int density, float bound)
theta
- the data period.density
- the data density (number of point).bound
- the data bounds (result have x in [-bound, bound[).public TextureDrawer getSpriteDrawer()
public RulerModel getXRulerModel()
public RulerModel getYRulerModel()