Class Circle
java.lang.Object
com.codename1.maps.MapObject
com.codename1.maps.Circle
A geodesic circle drawn on a map, described by a center and a radius in
meters. Add one through
MapSurface.addCircle(Circle).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe circle center.intThe fill color as 0xAARRGGBB (alpha in the high byte).doubleThe radius in meters.intThe stroke color as 0xRRGGBB.intThe stroke width in pixels (0 hides the outline).booleanWhether the circle is rendered.Moves the circle center.setFillColor(int fillColor) Sets the fill color as 0xAARRGGBB (alpha in the high byte).setRadiusMeters(double radiusMeters) Sets the radius in meters.setStrokeColor(int strokeColor) Sets the stroke color as 0xRRGGBB.setStrokeWidth(int strokeWidth) Sets the stroke width in pixels (0 hides the outline).setVisible(boolean visible) Shows or hides the circle.
-
Constructor Details
-
Circle
Creates a circle.
Parameters
-
center: the geographic center -
radiusMeters: the radius in meters
-
-
-
Method Details
-
getCenter
The circle center. -
setCenter
-
getRadiusMeters
public double getRadiusMeters()The radius in meters. -
setRadiusMeters
Sets the radius in meters. -
getFillColor
public int getFillColor()The fill color as 0xAARRGGBB (alpha in the high byte). -
setFillColor
Sets the fill color as 0xAARRGGBB (alpha in the high byte). -
getStrokeColor
public int getStrokeColor()The stroke color as 0xRRGGBB. -
setStrokeColor
Sets the stroke color as 0xRRGGBB. -
getStrokeWidth
public int getStrokeWidth()The stroke width in pixels (0 hides the outline). -
setStrokeWidth
Sets the stroke width in pixels (0 hides the outline). -
isVisible
public boolean isVisible()Whether the circle is rendered. -
setVisible
Shows or hides the circle.
-