PictureDrawable
declare class PictureDrawable extends BitmapDrawable {}
PictureDrawable
Instance Method
constructor
Signature
declare class PictureDrawable {
constructor(url: string): void;
}
Description
Create a new PictureDrawable.
invalidate
Signature
declare class PictureDrawable {
invalidate() : void;
}
Description
Redraw the current Drawable.
setGravity
Signature
declare class PictureDrawable {
setGravity(gravity: number): void;
}
Description
Set the gravity used to position/stretch the bitmap within its bounds.
addOnLoaded
Signature
declare class PictureDrawable {
addOnLoaded(notify: Consumer<Picture.PictureStatus>): void;
}
Description
Picture loaded notify.
draw
Signature
declare class PictureDrawable {
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 PictureDrawable {
setAlpha(alpha: number): void;
}
Description
Specify an alpha value for the drawable.
onBoundsChange
Signature
declare class PictureDrawable {
onBoundsChange(bounds: Rect): void;
}
Description
Override this in your subclass to change appearance if you vary based on the bounds.
copyBounds
Signature
declare class PictureDrawable {
copyBounds() : Rect;
}
Description
Return a copy of the drawable's bounds in a new Rect.
copyBounds
Signature
declare class PictureDrawable {
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 PictureDrawable {
getMinimumWidth(): number;
}
Description
Returns the minimum width suggested by this Drawable.
getMinimumHeight
Signature
declare class PictureDrawable {
getMinimumHeight(): number;
}
Description
Returns the minimum height suggested by this Drawable.
getBounds
Signature
declare class PictureDrawable {
getBounds(): Rect;
}
Description
Return the drawable's bounds Rect.
getOutline
Signature
declare class PictureDrawable {
getOutline(outline:Outline):void;
}
Description
Called to get the drawable to populate the Outline that defines its drawing area.
getCallback
Signature
declare class PictureDrawable {
getCallback() :Drawable.Callback;
}
Description
Return the currentCallback
implementation attached to this Drawable.
getIntrinsicWidth
Signature
declare class PictureDrawable {
getIntrinsicWidth(): number;
}
Description
Returns the drawable's intrinsic width.
getIntrinsicHeight
Signature
declare class PictureDrawable {
getIntrinsicHeight():number;
}
Description
Returns the drawable's intrinsic height.
setBounds
Signature
declare class PictureDrawable {
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 PictureDrawable {
setCallback(callback: Drawable.Callback): void;
}
Description
Bind aCallback
object to this Drawable.