PictureDrawable

open class PictureDrawable : Drawable
kotlin.Any
   ↳ android.graphics.drawable.Drawable
   ↳ android.graphics.drawable.PictureDrawable

Drawable subclass that wraps a Picture, allowing the picture to be used wherever a Drawable is supported.

Summary

Public constructors
<init>(picture: Picture!)

Construct a new drawable referencing the specified picture.

Public methods
open Unit
draw(canvas: Canvas)

open Unit
setAlpha(alpha: Int)

open Int

open Int

open Int

open Unit
setPicture(picture: Picture!)

Associate a picture with this drawable.

open Unit
setColorFilter(colorFilter: ColorFilter?)

open Picture!

Return the picture associated with the drawable.

Inherited functions

Public constructors

<init>

PictureDrawable(picture: Picture!)

Construct a new drawable referencing the specified picture. The picture may be null.

Parameters
picture Picture!: The picture to associate with the drawable. May be null.

Public methods

draw

open fun draw(canvas: Canvas): Unit

setAlpha

open fun setAlpha(alpha: Int): Unit

getOpacity

open fun getOpacity(): Int

getIntrinsicWidth

open fun getIntrinsicWidth(): Int

getIntrinsicHeight

open fun getIntrinsicHeight(): Int

setPicture

open fun setPicture(picture: Picture!): Unit

Associate a picture with this drawable. The picture may be null.

Parameters
picture Picture!: The picture to associate with the drawable. May be null.

setColorFilter

open fun setColorFilter(colorFilter: ColorFilter?): Unit

getPicture

open fun getPicture(): Picture!

Return the picture associated with the drawable. May be null.

Return
Picture!: the picture associated with the drawable, or null.