Companion

object Companion

Properties

Link copied to clipboard

Default solid black brush

Link copied to clipboard

Delegates painting to other most suitable brush

Functions

Link copied to clipboard
@Stable
fun QrBrush.Companion.brush(mode: QrBrushMode = Join, builder: (size: Float) -> Brush): QrBrush

Any Compose brush constructed in builder with specific QR code part size. This can be gradient brushes like, shader brush or any other.

Link copied to clipboard
@Stable
fun QrBrush.Companion.image(painter: Painter, alpha: Float = 1.0f, colorFilter: ColorFilter? = null): QrBrush

Shader brush that resizes the image painter to the required size. painter resolution should be square for better result.

Link copied to clipboard
@Stable
fun QrBrush.Companion.random(vararg probabilities: Pair<Float, Color>, random: Random = Random(13)): QrBrush

Random solid color picked from given probabilities. Custom source of randomness can be used.

Link copied to clipboard
@Stable
fun QrBrush.Companion.solid(color: Color): QrBrush

SolidColor brush from color