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
mResourceProxy, mScale, SHADOW_X_SKEW, SHADOW_Y_SCALE
DEBUGMODE, DEFAULT_ZOOMLEVEL_MINIMAP_DIFFERENCE, NOT_SET
Constructor and Description |
---|
NonAcceleratedOverlay(android.content.Context ctx) |
NonAcceleratedOverlay(ResourceProxy pResourceProxy) |
Modifier and Type | Method and Description |
---|---|
protected void |
draw(android.graphics.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(android.graphics.Canvas c,
android.graphics.Canvas acceleratedCanvas,
MapView osmv,
boolean shadow)
Override if you really want access to the original (possibly) accelerated canvas.
|
protected abstract void |
onDraw(android.graphics.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
public NonAcceleratedOverlay(android.content.Context ctx)
public NonAcceleratedOverlay(ResourceProxy pResourceProxy)
protected abstract void onDraw(android.graphics.Canvas c, MapView osmv, boolean shadow)
draw(Canvas, MapView, boolean)
.protected void onDraw(android.graphics.Canvas c, android.graphics.Canvas acceleratedCanvas, MapView osmv, boolean shadow)
public boolean isUsingBackingBitmap()
public void onDetach(MapView mapView)
Overlay
protected final void draw(android.graphics.Canvas c, MapView osmv, boolean shadow)
Overlay
Copyright © 2015. All Rights Reserved.