Package org.jzy3d.plot3d.primitives.axis
Class AxisTickProcessor
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.axis.AxisTickProcessor
-
public class AxisTickProcessor extends Object
A helper class to process and draw axis ticks. Processing requires calling there theAxisLabelProcessormethods.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected AxisBoxaxisprotected AxisLabelProcessorlabelsprotected IAxisLayoutlayout
-
Constructor Summary
Constructors Constructor Description AxisTickProcessor(AxisBox axis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Horizontalalign(Horizontal alignDefault, int dimension, Camera cam, Coord3d tickPosition)Compute horizontal alignement of a tick label based on tick position relative to camera, if the input default is nullVerticalalign(Vertical alignDefault, int dimension, float zdir)Compute the vertical alignment of a tick label based on direction in Z space.voiddrawAxisTickNumericLabel(IPainter painter, int direction, Color color, Horizontal hAlign, Vertical vAlign, BoundingBox3d ticksTxtBounds, String tickLabel, Coord3d tickPosition)AxisRenderingInfodrawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks)Draw an array of ticks on the given axis indicated by direction field.AxisRenderingInfodrawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, Coord3d pos, Coord3d dir, double[] ticks)voiddrawTickLine(IPainter painter, Color color, Coord3d pos, Coord3d lab)Actually draws the line.BoundingBox3ddrawTicks(IPainter painter, int axis, int dimension, Color color)BoundingBox3ddrawTicks(IPainter painter, int axis, int dimension, Color color, Horizontal hal, Vertical val)Draws axis labels, tick lines and tick labelprotected Coord3dtickDirection(int quad_0, int quad_1)protected Coord3dtickPosition(int quad_0, int quad_1)
-
-
-
Field Detail
-
axis
protected AxisBox axis
-
layout
protected IAxisLayout layout
-
labels
protected AxisLabelProcessor labels
-
-
Constructor Detail
-
AxisTickProcessor
public AxisTickProcessor(AxisBox axis)
-
-
Method Detail
-
drawTicks
public BoundingBox3d drawTicks(IPainter painter, int axis, int dimension, Color color)
-
drawTicks
public BoundingBox3d drawTicks(IPainter painter, int axis, int dimension, Color color, Horizontal hal, Vertical val)
Draws axis labels, tick lines and tick label
-
drawAxisTicks
public AxisRenderingInfo drawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, Coord3d pos, Coord3d dir, double[] ticks)
-
drawAxisTicks
public AxisRenderingInfo drawAxisTicks(IPainter painter, int dimension, Color color, Horizontal hal, Vertical val, float tickLength, BoundingBox3d ticksTxtBounds, double xpos, double ypos, double zpos, float xdir, float ydir, float zdir, double[] ticks)
Draw an array of ticks on the given axis indicated by direction field. Return the segment of the axis.
-
drawAxisTickNumericLabel
public void drawAxisTickNumericLabel(IPainter painter, int direction, Color color, Horizontal hAlign, Vertical vAlign, BoundingBox3d ticksTxtBounds, String tickLabel, Coord3d tickPosition)
-
align
public Vertical align(Vertical alignDefault, int dimension, float zdir)
Compute the vertical alignment of a tick label based on direction in Z space.
-
align
public Horizontal align(Horizontal alignDefault, int dimension, Camera cam, Coord3d tickPosition)
Compute horizontal alignement of a tick label based on tick position relative to camera, if the input default is null
-
drawTickLine
public void drawTickLine(IPainter painter, Color color, Coord3d pos, Coord3d lab)
Actually draws the line.
-
tickPosition
protected Coord3d tickPosition(int quad_0, int quad_1)
-
tickDirection
protected Coord3d tickDirection(int quad_0, int quad_1)
-
-