de.erichseifert.gral.plots.lines
Class SmoothLineRenderer2D
- java.lang.Object
-
- de.erichseifert.gral.plots.lines.AbstractLineRenderer2D
-
- de.erichseifert.gral.plots.lines.SmoothLineRenderer2D
-
- All Implemented Interfaces:
- LineRenderer, java.io.Serializable
public class SmoothLineRenderer2D extends AbstractLineRenderer2D
Class that connects
DataPoints with a smooth line.See Interpolation with Bezier Curves for more information.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description SmoothLineRenderer2D()Initializes a newSmoothLineRenderer2Dinstance with default settings.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description DrawablegetLine(java.util.List<DataPoint> points, java.awt.Shape shape)Returns a graphical representation for the line defined bypoints.java.awt.ShapegetLineShape(java.util.List<DataPoint> points)Returns the geometric shape for this line.java.lang.NumbergetSmoothness()Returns the smoothness of the line.voidsetSmoothness(java.lang.Number smoothness)Returns the smoothness of the line.-
Methods inherited from class de.erichseifert.gral.plots.lines.AbstractLineRenderer2D
getColor, getGap, getStroke, isGapRounded, setColor, setGap, setGapRounded, setStroke
-
-
-
-
Constructor Detail
-
SmoothLineRenderer2D
public SmoothLineRenderer2D()
Initializes a newSmoothLineRenderer2Dinstance with default settings.
-
-
Method Detail
-
getLine
public Drawable getLine(java.util.List<DataPoint> points, java.awt.Shape shape)
Returns a graphical representation for the line defined bypoints.- Parameters:
points- Points to be used for creating the line.shape- Geometric shape for this line.- Returns:
- Representation of the line.
-
getLineShape
public java.awt.Shape getLineShape(java.util.List<DataPoint> points)
Returns the geometric shape for this line.- Parameters:
points- Points used for creating the line.- Returns:
- Geometric shape for this line.
-
getSmoothness
public java.lang.Number getSmoothness()
Returns the smoothness of the line. The value must be in range 0 (sharpest) to 1 (smoothest).- Returns:
- Line smoothness.
-
setSmoothness
public void setSmoothness(java.lang.Number smoothness)
Returns the smoothness of the line. The value must be in range 0 (sharpest) to 1 (smoothest).- Parameters:
smoothness- Line smoothness.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG