IconPainter

class IconPainter(image: ImageBitmap, srcSize: IntSize = IntSize(image.width, image.height), padding: Dp = 20.dp, tint: Color? = null, backgroundColor: Color = Color.Transparent) : Painter

A Painter that draws an icon with padding and tint.

Since

1.0.0-beta.1

Parameters

image

The icon image to draw.

srcSize

The size of the icon image. Defaults to the size of the image.

padding

The padding around the icon. Defaults to 20.dp.

tint

The tint color to apply to the icon. Defaults to null.

backgroundColor

The background color to fill around the icon. Defaults to Color.Transparent.

Constructors

Link copied to clipboard
constructor(image: ImageBitmap, srcSize: IntSize = IntSize(image.width, image.height), padding: Dp = 20.dp, tint: Color? = null, backgroundColor: Color = Color.Transparent)

Properties

Link copied to clipboard
open override val intrinsicSize: Size

Functions

Link copied to clipboard
protected open override fun DrawScope.onDraw()