Package org.opentrafficsim.draw.core
Class PaintLine
java.lang.Object
org.opentrafficsim.draw.core.PaintLine
Paint a line as a Path2D.Double
Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Peter Knoppers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opentrafficsim.core.geometry.OtsPoint3d
Dummy coordinate that forces the drawing operation to start a new path. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
paintLine
(Graphics2D graphics, Color color, double width, Point<?> referencePoint, PolyLine3d line) Paint line.static void
paintLine
(Graphics2D graphics, Color color, double width, Point<?> referencePoint, org.opentrafficsim.core.geometry.OtsLine3d line) Paint line.
-
Field Details
-
NEWPATH
public static final org.opentrafficsim.core.geometry.OtsPoint3d NEWPATHDummy coordinate that forces the drawing operation to start a new path.
-
-
Method Details
-
paintLine
public static void paintLine(Graphics2D graphics, Color color, double width, Point<?> referencePoint, PolyLine3d line) Paint line.- Parameters:
graphics
- Graphics2D; the graphics environmentcolor
- Color; the color to usewidth
- double; the width to usereferencePoint
- DirectedPoint; the reference pointline
- OtsLine3d; array of points
-
paintLine
public static void paintLine(Graphics2D graphics, Color color, double width, Point<?> referencePoint, org.opentrafficsim.core.geometry.OtsLine3d line) Paint line.- Parameters:
graphics
- Graphics2D; the graphics environmentcolor
- Color; the color to usewidth
- double; the width to usereferencePoint
- DirectedPoint; the reference pointline
- OtsLine3d; array of points
-