Package org.opentrafficsim.draw
Class PaintLine
java.lang.Object
org.opentrafficsim.draw.PaintLine
Paint a line as a Path2D.Double
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Peter Knoppers, Wouter Schakel
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path2D.FloatgetPath(org.djutils.draw.line.PolyLine2d line) Returns drawable path of the line.static Path2D.FloatgetPath(org.djutils.draw.point.OrientedPoint2d referencePoint, org.djutils.draw.line.PolyLine2d line) Returns drawable path of the line.static Path2D.FloatgetPath(org.djutils.draw.point.Point2d referencePoint, org.djutils.draw.line.PolyLine2d line) Returns drawable path of the line.static voidpaintLine(Graphics2D graphics, Color color, double width, Path2D.Float path) Paint line.
-
Method Details
-
getPath
Returns drawable path of the line.- Parameters:
line- PolyLine2d; array of points- Returns:
- Path2D.Float drawable path.
-
getPath
public static Path2D.Float getPath(org.djutils.draw.point.Point2d referencePoint, org.djutils.draw.line.PolyLine2d line) Returns drawable path of the line.- Parameters:
referencePoint- Point2d; the reference pointline- PolyLine2d; array of points- Returns:
- Path2D.Float drawable path.
-
getPath
public static Path2D.Float getPath(org.djutils.draw.point.OrientedPoint2d referencePoint, org.djutils.draw.line.PolyLine2d line) Returns drawable path of the line.- Parameters:
referencePoint- OrientedPoint2d; the reference pointline- PolyLine2d; array of points- Returns:
- Path2D.Float drawable path.
-
paintLine
Paint line.- Parameters:
graphics- Graphics2D; the graphics environmentcolor- Color; the color to usewidth- double; the width to usepath- Path2D.Float; drawable path
-