BitmapShader_Delegatepublic class BitmapShader_Delegate extends Shader_Delegate Delegate implementing the native methods of android.graphics.BitmapShader
Through the layoutlib_create tool, the original native methods of BitmapShader have been
replaced by calls to methods of the same name in this delegate class.
This class behaves like the original native implementation, but in Java, keeping previously
native data into its own objects and mapping them to int that are sent back and forth between
it and the original BitmapShader class.
Because this extends {@link Shader_Delegate}, there's no need to use a {@link DelegateManager},
as all the Shader classes will be added to the manager owned by {@link Shader_Delegate}. |
Fields Summary |
---|
private Paint | mJavaPaint |
Methods Summary |
---|
public java.awt.Paint | getJavaPaint()
return mJavaPaint;
| public java.lang.String | getSupportMessage()
// no message since isSupported returns true;
return null;
| public boolean | isSupported()
return true;
| static long | nativeCreate(long native_bitmap, int shaderTileModeX, int shaderTileModeY)
Bitmap_Delegate bitmap = Bitmap_Delegate.getDelegate(native_bitmap);
if (bitmap == null) {
return 0;
}
BitmapShader_Delegate newDelegate = new BitmapShader_Delegate(
bitmap.getImage(),
Shader_Delegate.getTileMode(shaderTileModeX),
Shader_Delegate.getTileMode(shaderTileModeY));
return sManager.addNewDelegate(newDelegate);
|
|