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 boolean
contains(org.mapsforge.core.model.Point center, org.mapsforge.core.model.Point point)
protected int
getRadiusInPixels(double latitude, byte zoomLevel)
boolean
isScaleRadius()
void
setScaleRadius(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 initialPaint
used to fill this circle (may be null).paintStroke
- the initialPaint
used to stroke this circle (may be null).- Throws:
java.lang.IllegalArgumentException
- if the givenradius
is 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 initialPaint
used to fill this circle (may be null).paintStroke
- the initialPaint
used 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 givenradius
is 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:
getRadiusInPixels
in 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.
-
-