Package org.jfree.chart.util
Class LineUtilities
- java.lang.Object
-
- org.jfree.chart.util.LineUtilities
-
public class LineUtilities extends java.lang.Object
Some utility methods forLine2Dobjects.- Since:
- 1.0.12
-
-
Constructor Summary
Constructors Constructor Description LineUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanclipLine(java.awt.geom.Line2D line, java.awt.geom.Rectangle2D rect)Clips the specified line to the given rectangle.static java.awt.geom.Line2DextendLine(java.awt.geom.Line2D line, double startPercent, double endPercent)Creates a new line by extending an existing line.
-
-
-
Constructor Detail
-
LineUtilities
public LineUtilities()
-
-
Method Detail
-
clipLine
public static boolean clipLine(java.awt.geom.Line2D line, java.awt.geom.Rectangle2D rect)
Clips the specified line to the given rectangle.- Parameters:
line- the line (nullnot permitted).rect- the clipping rectangle (nullnot permitted).- Returns:
trueif the clipped line is visible, andfalseotherwise.
-
extendLine
public static java.awt.geom.Line2D extendLine(java.awt.geom.Line2D line, double startPercent, double endPercent)
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.
- Since:
- 1.0.18
-
-