LinearGradientDrawable
declare class LinearGradientDrawable {}
LinearGradientDrawable
Static Method
MakeAngle
Signature
declare class LinearGradientDrawable {
static MakeAngle(deg: number, colors: number[]): LinearGradientDrawable
}
Description
Creates a new fill linearGradientDrawable instance, specify the angle and color
MakeAngle
Signature
declare class LinearGradientDrawable {
static MakeAngle(deg: number, colors: number[], radius: number): LinearGradientDrawable
}
Description
Creates a new fill radius linearGradientDrawable instance, specify the angle and color
MakeAngle
Signature
declare class LinearGradientDrawable {
static MakeAngle(deg: number, colors: number[], lt: number, rt: number, rb: number, lb: number): LinearGradientDrawable
}
Description
Creates a new fill radius linearGradientDrawable instance, specify the angle and color
MakeAngle
Signature
declare class LinearGradientDrawable {
static MakeAngle(deg: number, colors: number[], radius: number, strokeWidth: number): LinearGradientDrawable
}
Description
Creates a new stroke radius linearGradientDrawable instance, specify the angle and color
MakeAngle
Signature
declare class LinearGradientDrawable {
static MakeAngle(deg: number, colors: number[], lt: number, rt: number, rb: number, lb: number, strokeWidth: number): LinearGradientDrawable
}
Description
Creates a new stroke radius linearGradientDrawable instance, specify the angle and color
MakeDirection
Signature
declare class LinearGradientDrawable {
static MakeDirection(dir: string, colors: number[]): LinearGradientDrawable
}
Description
Creates a new fill linearGradientDrawable instance, specify the direction and color
MakeDirection
Signature
declare class LinearGradientDrawable {
static MakeDirection(dir: string, colors: number[], radius: number): LinearGradientDrawable
}
Description
Creates a new fill radius linearGradientDrawable instance, specify the direction and color
MakeDirection
Signature
declare class LinearGradientDrawable {
static MakeDirection(dir: string, colors: number[], lt: number, rt: number, rb: number, lb: number): LinearGradientDrawable
}
Description
Creates a new fill radius linearGradientDrawable instance, specify the direction and color
MakeDirection
Signature
declare class LinearGradientDrawable {
static MakeDirection(dir: string, colors: number[], radius: number, strokeWidth: number): LinearGradientDrawable
}
Description
Creates a new stroke radius linearGradientDrawable instance, specify the direction and color
MakeDirection
Signature
declare class LinearGradientDrawable {
static MakeDirection(dir: string, colors: number[], lt: number, rt: number, rb: number, lb: number, strokeWidth: number): LinearGradientDrawable
}
Description
Creates a new stroke radius linearGradientDrawable instance, specify the direction and color
Instance Method
draw
Signature
declare class LinearGradientDrawable {
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 LinearGradientDrawable {
setAlpha(alpha: number): void
}
Description
Specify an alpha value for the drawable.
onBoundsChange
Signature
declare class LinearGradientDrawable {
onBoundsChange(bounds: Rect): void
}
Description
Override this in your subclass to change appearance if you vary based on the bounds.
copyBounds
Signature
declare class LinearGradientDrawable {
copyBounds() : Rect
}
Description
Return a copy of the drawable's bounds in a new Rect.
copyBounds
Signature
declare class LinearGradientDrawable {
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 LinearGradientDrawable {
getMinimumWidth(): number
}
Description
Returns the minimum width suggested by this Drawable.
getMinimumHeight
Signature
declare class LinearGradientDrawable {
getMinimumHeight(): number
}
Description
Returns the minimum height suggested by this Drawable.
getBounds
Signature
declare class LinearGradientDrawable {
getBounds(): Rect
}
Description
Return the drawable's bounds Rect.
getOutline
Signature
declare class LinearGradientDrawable {
getOutline(outline:Outline):void
}
Description
Called to get the drawable to populate the Outline that defines its drawing area.
getCallback
Signature
declare class LinearGradientDrawable {
getCallback() :Drawable.Callback
}
Description
Return the currentCallback
implementation attached to this Drawable.
getIntrinsicWidth
Signature
declare class LinearGradientDrawable {
getIntrinsicWidth(): number
}
Description
Returns the drawable's intrinsic width.
getIntrinsicHeight
Signature
declare class LinearGradientDrawable {
getIntrinsicHeight():number
}
Description
Returns the drawable's intrinsic height.
setBounds
Signature
declare class LinearGradientDrawable {
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 LinearGradientDrawable {
setCallback(callback: Drawable.Callback): void
}
Description
Bind aCallback
object to this Drawable.