Package org.openstreetmap.josm.gui.draw
Class MapPath2D
- java.lang.Object
-
- java.awt.geom.Path2D
-
- java.awt.geom.Path2D.Double
-
- org.openstreetmap.josm.gui.draw.MapPath2D
-
- All Implemented Interfaces:
java.awt.Shape,java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
MapViewPath
public class MapPath2D extends java.awt.geom.Path2D.Double
An extension ofPath2Dwith special methods for map positions.- Since:
- 10875
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapPath2D()Create a new, empty path.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MapPath2DlineTo(MapViewState.MapViewPoint p)Draw a line to the view position of given pointMapPath2DmoveTo(MapViewState.MapViewPoint p)Move the path to the view position of given pointMapPath2DshapeAround(MapViewState.MapViewPoint p, SymbolShape symbol, double size)Add the given shape centered around the given point-
Methods inherited from class java.awt.geom.Path2D.Double
append, clone, curveTo, getBounds2D, getPathIterator, lineTo, moveTo, quadTo, transform, trimToSize
-
Methods inherited from class java.awt.geom.Path2D
append, closePath, contains, contains, contains, contains, contains, contains, contains, contains, createTransformedShape, getBounds, getCurrentPoint, getPathIterator, getWindingRule, intersects, intersects, intersects, intersects, reset, setWindingRule
-
-
-
-
Constructor Detail
-
MapPath2D
public MapPath2D()
Create a new, empty path.
-
-
Method Detail
-
moveTo
public MapPath2D moveTo(MapViewState.MapViewPoint p)
Move the path to the view position of given point- Parameters:
p- The point- Returns:
- this for easy chaining.
-
lineTo
public MapPath2D lineTo(MapViewState.MapViewPoint p)
Draw a line to the view position of given point- Parameters:
p- The point- Returns:
- this for easy chaining.
-
shapeAround
public MapPath2D shapeAround(MapViewState.MapViewPoint p, SymbolShape symbol, double size)
Add the given shape centered around the given point- Parameters:
p- The point to draw aroundsymbol- The symbol typesize- The size of the symbol in pixel- Returns:
- this for easy chaining.
-
-