BitmapShader_Delegate.javaAPI DocAndroid 5.1 API8717Thu Mar 12 22:22:44 GMT


public class BitmapShader_Delegate extends Shader_Delegate
Delegate implementing the native methods of 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
Constructors Summary
private BitmapShader_Delegate(BufferedImage image, tileModeX, tileModeY)

        mJavaPaint = new BitmapShaderPaint(image, tileModeX, tileModeY);
Methods Summary
public java.awt.PaintgetJavaPaint()

        return mJavaPaint;
public java.lang.StringgetSupportMessage()

        // no message since isSupported returns true;
        return null;
public booleanisSupported()

        return true;
static longnativeCreate(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(
        return sManager.addNewDelegate(newDelegate);