public class SafeBitmapShader
extends android.graphics.BitmapShader
SafeTranslatedCanvas
to work around various Android issues with large canvases. For the two classes to work together,
call onDrawCycleStart(org.osmdroid.views.safecanvas.ISafeCanvas)
at the start of the Overlay#drawSafe
method of your
Overlay
. This will set the adjustment needed to draw your BitmapShader safely on the
canvas without any drawing distortion at high zoom levels and without any scrolling issues.ISafeCanvas}
Constructor and Description |
---|
SafeBitmapShader(android.graphics.Bitmap bitmap,
android.graphics.Shader.TileMode tileX,
android.graphics.Shader.TileMode tileY) |
Modifier and Type | Method and Description |
---|---|
void |
onDrawCycleStart(ISafeCanvas canvas)
This method must be called at the start of the
Overlay#drawSafe draw cycle
method. |
public SafeBitmapShader(android.graphics.Bitmap bitmap, android.graphics.Shader.TileMode tileX, android.graphics.Shader.TileMode tileY)
public void onDrawCycleStart(ISafeCanvas canvas)
Overlay#drawSafe
draw cycle
method. This will adjust the BitmapShader to the current state of the ISafeCanvas
passed to it.Copyright © 2014. All Rights Reserved.