BitmapDrawable
declare class BitmapDrawable {}
BitmapDrawable
Instance Method
constructor
Signature
declare class BitmapDrawable {
constructor();
constructor(bitmap: Bitmap)
}
Description
Create a new BitmapDrawable
getBitmap
Signature
declare class BitmapDrawable {
getBitmap(): Bitmap
}
Description
Returns the bitmap used by this drawable to render.
setBitmap
Signature
declare class BitmapDrawable {
setBitmap(bitmap: Bitmap): void
}
Description
Switch to a new Bitmap object.
setGravity
Signature
declare class BitmapDrawable {
setGravity(gravity: number): void
}
Description
Set the gravity used to position/stretch the bitmap within its bounds.
draw
Signature
declare class BitmapDrawable {
draw(canvas: Canvas): void
}
Description
Draw in its bounds (set via setBounds) respecting optional effects such as alpha (set via setAlpha) and color filter (set via setColorFilter).
setAlpha
Signature
declare class BitmapDrawable {
setAlpha(alpha: number): void
}
Description
Specify an alpha value for the drawable.
onBoundsChange
Signature
declare class BitmapDrawable {
onBoundsChange(bounds: Rect): void
}
Description
Override this in your subclass to change appearance if you vary based on the bounds.
copyBounds
Signature
declare class BitmapDrawable {
copyBounds() : Rect
}
Description
Return a copy of the drawable's bounds in a new Rect.
copyBounds
Signature
declare class BitmapDrawable {
copyBounds(bounds: Rect): void
}
Description
Return a copy of the drawable's bounds in the specified Rect (allocated by the caller).
getMinimumWidth
Signature
declare class BitmapDrawable {
getMinimumWidth(): number
}
Description
Returns the minimum width suggested by this Drawable.
getMinimumHeight
Signature
declare class BitmapDrawable {
getMinimumHeight(): number
}
Description
Returns the minimum height suggested by this Drawable.
getBounds
Signature
declare class BitmapDrawable {
getBounds(): Rect
}
Description
Return the drawable's bounds Rect.
getOutline
Signature
declare class BitmapDrawable {
getOutline(outline:Outline):void
}
Description
Called to get the drawable to populate the Outline that defines its drawing area.
getCallback
Signature
declare class BitmapDrawable {
getCallback() :Drawable.Callback
}
Description
Return the currentCallback
implementation attached to this Drawable.
getIntrinsicWidth
Signature
declare class BitmapDrawable {
getIntrinsicWidth(): number
}
Description
Returns the drawable's intrinsic width.
getIntrinsicHeight
Signature
declare class BitmapDrawable {
getIntrinsicHeight():number
}
Description
Returns the drawable's intrinsic height.
setBounds
Signature
declare class BitmapDrawable {
setBounds(bounds: Rect): void;
setBounds(left: number, top: number, right: number, bottom: number): void;
}
Description
Specify a bounding rectangle for the Drawable.
setCallback
Signature
declare class BitmapDrawable {
setCallback(callback: Drawable.Callback): void
}
Description
Bind aCallback
object to this Drawable.