Class ArrowPaintHelper
java.lang.Object
org.openstreetmap.josm.data.osm.visitor.paint.ArrowPaintHelper
This class helps with painting arrows with fixed length along a path.
- Since:
- 10827
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleGets the length of the arrow along the line segment.voidpaintArrowAt(MapPath2D path, MapViewState.MapViewPoint point, MapViewState.MapViewPoint fromDirection) Paint the arrow
-
Field Details
-
sin
-
cos
-
length
-
-
Constructor Details
-
ArrowPaintHelper
Creates a new arrow helper.- Parameters:
radians- The angle of the arrow. 0 means that it lies on the current line. In radianslength- The length of the arrow lines.
-
-
Method Details
-
paintArrowAt
public void paintArrowAt(MapPath2D path, MapViewState.MapViewPoint point, MapViewState.MapViewPoint fromDirection) Paint the arrow- Parameters:
path- The path to append the arrow to.point- The point to paint the tip atfromDirection- The direction the line is coming from.
-
getOnLineLength
Gets the length of the arrow along the line segment.- Returns:
- the length along the line
- Since:
- 12154
-