Package org.jfree.chart.util
Class LineUtilities
java.lang.Object
org.jfree.chart.util.LineUtilities
Some utility methods for
Line2D
objects.- Since:
- 1.0.12
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
clipLine
(Line2D line, Rectangle2D rect) Clips the specified line to the given rectangle.static Line2D
extendLine
(Line2D line, double startPercent, double endPercent) Creates a new line by extending an existing line.
-
Constructor Details
-
LineUtilities
public LineUtilities()
-
-
Method Details
-
clipLine
Clips the specified line to the given rectangle.- Parameters:
line
- the line (null
not permitted).rect
- the clipping rectangle (null
not permitted).- Returns:
true
if the clipped line is visible, andfalse
otherwise.
-
extendLine
Creates a new line by extending an existing line.- Parameters:
line
- the line (null
not 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
-