Bitmap

@RequiresApi(value = 31)
data class Bitmap(val bitmap: Bitmap, val src: Rect? = null, val dst: Rect? = null) : LithoRenderEffect

A LithoRenderEffect that renders the contents of the input android.graphics.Bitmap. This is useful to create an input for other LithoRenderEffect types such as Blur or ColorFilter.

Parameters

bitmap

The source bitmap to be rendered by the created LithoRenderEffect

src

Optional subset of the bitmap to be part of the rendered output. If null is provided, the entire bitmap bounds are used.

dst

Bounds of the destination which the bitmap is translated and scaled to be drawn into within the bounds of the android.graphics.RenderNode this LithoRenderEffect is installed on

See RenderEffect.createBitmapEffect

Constructors

Link copied to clipboard
constructor(bitmap: Bitmap, src: Rect? = null, dst: Rect? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val dst: Rect? = null
Link copied to clipboard
val src: Rect? = null

Functions

Link copied to clipboard
open override fun toRenderEffect(): RenderEffect

Creates a RenderEffect instance from this LithoRenderEffect.