public abstract class NonAcceleratedOverlay extends Overlay
Overlay
that is not HW acceleration compatible to work in a HW
accelerated MapView. It will create a screen-sized backing Bitmap for the Overlay to draw to and
then will draw the Bitmap to the HW accelerated canvas. Due to the extra work, it does not draw
the shadow layer. If the Canvas passed into the Overlay is not HW accelerated or if
isUsingBackingBitmap()
returns false then it draws normally (including the shadow layer)
without the backing Bitmap. Overlay.Snappable
SHADOW_X_SKEW, SHADOW_Y_SCALE
DEBUGMODE, DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
NonAcceleratedOverlay() |
NonAcceleratedOverlay(Context ctx)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas c,
MapView osmv,
boolean shadow)
Draw the overlay over the map.
|
boolean |
isUsingBackingBitmap()
Allow forcing this overlay to skip drawing using backing Bitmap by returning false.
|
void |
onDetach(MapView mapView)
Override to perform clean up of resources before shutdown.
|
protected void |
onDraw(Canvas c,
Canvas acceleratedCanvas,
MapView osmv,
boolean shadow)
Override if you really want access to the original (possibly) accelerated canvas.
|
protected abstract void |
onDraw(Canvas c,
MapView osmv,
boolean shadow)
A delegate for
draw(Canvas, MapView, boolean) . |
drawAt, getSafeMenuId, getSafeMenuIdSequence, isEnabled, onDoubleTap, onDoubleTapEvent, onDown, onFling, onKeyDown, onKeyUp, onLongPress, onScroll, onShowPress, onSingleTapConfirmed, onSingleTapUp, onTouchEvent, onTrackballEvent, setEnabled
@Deprecated public NonAcceleratedOverlay(Context ctx)
NonAcceleratedOverlay()
insteadpublic NonAcceleratedOverlay()
protected abstract void onDraw(Canvas c, MapView osmv, boolean shadow)
draw(Canvas, MapView, boolean)
.protected void onDraw(Canvas c, Canvas acceleratedCanvas, MapView osmv, boolean shadow)
public boolean isUsingBackingBitmap()
public void onDetach(MapView mapView)
Overlay
public final void draw(Canvas c, MapView osmv, boolean shadow)
Overlay