Package org.mapsforge.map.layer.overlay
Class FixedPixelCircle
- java.lang.Object
-
- org.mapsforge.map.layer.Layer
-
- org.mapsforge.map.layer.overlay.Circle
-
- org.mapsforge.map.layer.overlay.FixedPixelCircle
-
public class FixedPixelCircle extends Circle
A Circle class that is always drawn with the same size in pixels.
-
-
Field Summary
-
Fields inherited from class org.mapsforge.map.layer.Layer
displayModel
-
-
Constructor Summary
Constructors Constructor Description FixedPixelCircle(org.mapsforge.core.model.LatLong latLong, float radius, org.mapsforge.core.graphics.Paint paintFill, org.mapsforge.core.graphics.Paint paintStroke)FixedPixelCircle(org.mapsforge.core.model.LatLong latLong, float radius, org.mapsforge.core.graphics.Paint paintFill, org.mapsforge.core.graphics.Paint paintStroke, boolean keepAligned)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(org.mapsforge.core.model.Point center, org.mapsforge.core.model.Point point)protected intgetRadiusInPixels(double latitude, byte zoomLevel)booleanisScaleRadius()voidsetScaleRadius(boolean scaleRadius)-
Methods inherited from class org.mapsforge.map.layer.overlay.Circle
contains, draw, getPaintFill, getPaintStroke, getPosition, getRadius, isKeepAligned, setLatLong, setPaintFill, setPaintStroke, setRadius
-
Methods inherited from class org.mapsforge.map.layer.Layer
getDisplayModel, isVisible, onAdd, onDestroy, onLongPress, onRemove, onScroll, onTap, requestRedraw, setDisplayModel, setVisible, setVisible
-
-
-
-
Constructor Detail
-
FixedPixelCircle
public FixedPixelCircle(org.mapsforge.core.model.LatLong latLong, float radius, org.mapsforge.core.graphics.Paint paintFill, org.mapsforge.core.graphics.Paint paintStroke)- Parameters:
latLong- the initial center point of this circle (may be null).radius- the initial non-negative radius of this circle in pixels.paintFill- the initialPaintused to fill this circle (may be null).paintStroke- the initialPaintused to stroke this circle (may be null).- Throws:
java.lang.IllegalArgumentException- if the givenradiusis negative orFloat.NaN.
-
FixedPixelCircle
public FixedPixelCircle(org.mapsforge.core.model.LatLong latLong, float radius, org.mapsforge.core.graphics.Paint paintFill, org.mapsforge.core.graphics.Paint paintStroke, boolean keepAligned)- Parameters:
latLong- the initial center point of this circle (may be null).radius- the initial non-negative radius of this circle in pixels.paintFill- the initialPaintused to fill this circle (may be null).paintStroke- the initialPaintused to stroke this circle (may be null).keepAligned- if set to true it will keep the bitmap aligned with the map, to avoid a moving effect of a bitmap shader.- Throws:
java.lang.IllegalArgumentException- if the givenradiusis negative orFloat.NaN.
-
-
Method Detail
-
contains
public boolean contains(org.mapsforge.core.model.Point center, org.mapsforge.core.model.Point point)
-
getRadiusInPixels
protected int getRadiusInPixels(double latitude, byte zoomLevel)- Overrides:
getRadiusInPixelsin classCircle- Returns:
- the non-negative radius of this circle in pixels.
-
isScaleRadius
public boolean isScaleRadius()
- Returns:
- true if it scales the radius with the combined device/user scale factor, false otherwise.
-
setScaleRadius
public void setScaleRadius(boolean scaleRadius)
- Parameters:
scaleRadius- if set to true it will scale the radius with the combined device/user scale factor.
-
-