public class Overlay
extends java.lang.Object
AnimatedVectorDrawable
, can't extend
the final Polygon
)...Modifier and Type | Field and Description |
---|---|
(package private) float[] |
ALPHAS
An array of
float to be applied to the list of PolyDrawer . |
private com.mapbox.mapboxsdk.geometry.LatLngBounds |
bounds_
An aligned rectangle for the geographical boundary of this poly.
|
(package private) Gradient |
fill_gradient_
A
Gradient object for peels' fill color interpolation. |
private ValueAnimator |
growth_animator_
A
ValueAnimator instance for triggering growth animations. |
private ValueAnimator.AnimateListener |
growth_listener_ |
private boolean |
inside_
A boolean that indicates if the user is within this overlay.
|
private boolean |
on_
A boolean that indicates if this overlay is on the map.
|
private float |
opacity_
How far is the
SharedBuffer.user_location_ from the PlaceEntity.center_ . |
(package private) java.util.ArrayList<PolyDrawer> |
peels_
A list of
PolyDrawer for the morphing shapes. |
private short |
PEELS_AMOUNT
The default amount of
peels_ . |
(package private) float |
peels_amount_
The amount of peels (meaning:
PolyDrawer ) we should create. |
(package private) PlaceEntity |
place_
A
PlaceEntity object descriptor this overlay belongs to. |
(package private) Gradient |
stroke_gradient_
A
Gradient object for peels' stroke color interpolation. |
(package private) float |
STROKE_WIDTH
The default stoke width of polygons.
|
Constructor and Description |
---|
Overlay(PlaceEntity place)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
compute_peels()
Computes
bounds_ . |
void |
in()
The user location is inside.
|
void |
off()
Removes this overlay from the map.
|
void |
out(float opacity)
The user is outside.
|
private void |
start_growth()
Starts the growth animation.
|
private void |
stop_growth()
Stops the growth animation.
|
final float STROKE_WIDTH
final float[] ALPHAS
float
to be applied to the list of PolyDrawer
. Index 0 is for the
polygon, index 1 is for the polyline.final PlaceEntity place_
PlaceEntity
object descriptor this overlay belongs to.final Gradient stroke_gradient_
Gradient
object for peels' stroke color interpolation.final java.util.ArrayList<PolyDrawer> peels_
PolyDrawer
for the morphing shapes.private final short PEELS_AMOUNT
peels_
.private final ValueAnimator growth_animator_
ValueAnimator
instance for triggering growth animations.private final ValueAnimator.AnimateListener growth_listener_
float peels_amount_
PolyDrawer
) we should create.private com.mapbox.mapboxsdk.geometry.LatLngBounds bounds_
private boolean on_
private boolean inside_
private float opacity_
SharedBuffer.user_location_
from the PlaceEntity.center_
.Overlay(PlaceEntity place)
place
- The PlaceEntity
this overlay is attached tovoid compute_peels()
public void off()
private void stop_growth()
public void in()
private void start_growth()
public void out(float opacity)
opacity
- The new opacity_
to set.