FileDocCategorySizeDatePackage
BitmapShader_Delegate.javaAPI DocAndroid 5.1 API8717Thu Mar 12 22:22:44 GMT 2015android.graphics

BitmapShader_Delegate

public 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}.
see
Shader_Delegate

Fields Summary
private Paint
mJavaPaint
Constructors Summary
private BitmapShader_Delegate(BufferedImage image, android.graphics.Shader.TileMode tileModeX, android.graphics.Shader.TileMode 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(
                bitmap.getImage(),
                Shader_Delegate.getTileMode(shaderTileModeX),
                Shader_Delegate.getTileMode(shaderTileModeY));
        return sManager.addNewDelegate(newDelegate);