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:
Shape,Serializable,Cloneable
- Direct Known Subclasses:
MapViewPath
An extension of
Path2D with special methods for map positions.- Since:
- 10875
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.geom.Path2D
Path2D.Double, Path2D.Float -
Field Summary
Fields inherited from class java.awt.geom.Path2D
WIND_EVEN_ODD, WIND_NON_ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDraw a line to the view position of given pointMove the path to the view position of given pointshapeAround(MapViewState.MapViewPoint p, SymbolShape symbol, double size) Add the given shape centered around the given pointMethods inherited from class java.awt.geom.Path2D.Double
append, clone, curveTo, getBounds2D, getPathIterator, lineTo, moveTo, quadTo, transform, trimToSizeMethods 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 Details
-
MapPath2D
public MapPath2D()Create a new, empty path.
-
-
Method Details
-
moveTo
Move the path to the view position of given point- Parameters:
p- The point- Returns:
- this for easy chaining.
-
lineTo
Draw a line to the view position of given point- Parameters:
p- The point- Returns:
- this for easy chaining.
-
shapeAround
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.
-