Package org.jfree.chart.util
Class LineUtils
java.lang.Object
org.jfree.chart.util.LineUtils
Some utility methods for
Line2D objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanclipLine(Line2D line, Rectangle2D rect) Clips the specified line to the given rectangle.static Line2DextendLine(Line2D line, double startPercent, double endPercent) Creates a new line by extending an existing line.
-
Constructor Details
-
LineUtils
public LineUtils()
-
-
Method Details
-
clipLine
Clips the specified line to the given rectangle. If any of the line coordinates is not finite, then the method returnsfalseand the line is not modified.- Parameters:
line- the line (nullnot permitted).rect- the clipping rectangle (nullnot permitted).- Returns:
trueif the clipped line is visible, andfalseotherwise.
-
extendLine
Creates a new line by extending an existing line.- Parameters:
line- the line (nullnot permitted).startPercent- the amount to extend the line at the start point end.endPercent- the amount to extend the line at the end point end.- Returns:
- A new line.
-