BitmapShaderpublic class BitmapShader extends Shader Shader used to draw a bitmap as a texture. The bitmap can be repeated or
mirrored by setting the tiling mode. |
Fields Summary |
---|
public final Bitmap | mBitmapPrevent garbage collection. | private TileMode | mTileX | private TileMode | mTileY |
Constructors Summary |
---|
public BitmapShader(Bitmap bitmap, TileMode tileX, TileMode tileY)Call this to create a new shader that will draw with a bitmap.
mBitmap = bitmap;
mTileX = tileX;
mTileY = tileY;
final long b = bitmap.ni();
init(nativeCreate(b, tileX.nativeInt, tileY.nativeInt));
|
Methods Summary |
---|
protected Shader | copy()
final BitmapShader copy = new BitmapShader(mBitmap, mTileX, mTileY);
copyLocalMatrix(copy);
return copy;
| private static native long | nativeCreate(long native_bitmap, int shaderTileModeX, int shaderTileModeY)
|
|