Package-level declarations

Types

Link copied to clipboard
@Immutable
class Neighbors(val topLeft: Boolean = false, val topRight: Boolean = false, val left: Boolean = false, val top: Boolean = false, val right: Boolean = false, val bottomLeft: Boolean = false, val bottom: Boolean = false, val bottomRight: Boolean = false)

Status of the neighbor QR code pixels or eyes

Link copied to clipboard
@Stable
class QrBackground(val painter: Painter? = null, val fill: Brush? = null, val shape: Shape = RectangleShape)
Link copied to clipboard
@Stable
interface QrBallShape : QrShapeModifier

Style of the qr-code eye internal ball.

Link copied to clipboard
@Stable
interface QrBrush

Color Brush factory for a QR code part.

Link copied to clipboard
Link copied to clipboard
class QrCodeMatrix(val size: Int, initialFill: QrCodeMatrix.PixelType = PixelType.Background)
Link copied to clipboard
@Stable
interface QrCodeShape

Shape of the QR-code pattern.

Link copied to clipboard
@Stable
class QrColors(val dark: QrBrush = QrBrush.Default, val light: QrBrush = QrBrush.Unspecified, val ball: QrBrush = QrBrush.Unspecified, val frame: QrBrush = QrBrush.Unspecified)

Colors of QR code elements

Link copied to clipboard

QR code allows you to read encoded information even if a part of the QR code image is damaged. It also allows to have logo inside the code as a part of "damage".

Link copied to clipboard
@Stable
interface QrFrameShape : QrShapeModifier

Style of the qr-code eye frame.

Link copied to clipboard
@Stable
class QrLogo(val painter: Painter? = null, val size: Float = 0.25f, val padding: QrLogoPadding = QrLogoPadding.Empty, val shape: QrLogoShape = QrLogoShape.Default)

Logo (middle image) of the QR code.

Link copied to clipboard
@Stable
sealed interface QrLogoPadding

Type of padding applied to the logo. Helps to highlight the logo inside the QR code pattern. Padding can be added regardless of the presence of a logo.

Link copied to clipboard
@Stable
interface QrLogoShape : QrShapeModifier
Link copied to clipboard
@Stable
class QrOptions(val shapes: QrShapes = QrShapes(), val colors: QrColors = QrColors(), val logo: QrLogo = QrLogo(), val background: QrBackground = QrBackground(), val errorCorrectionLevel: QrErrorCorrectionLevel = QrErrorCorrectionLevel.Auto, val fourEyed: Boolean = false, val scale: Float = 1.0f)

Styling options of the QR code

Link copied to clipboard
@Stable
fun interface QrPixelShape : QrShapeModifier

Style of the qr-code pixels.

Link copied to clipboard
fun interface QrShapeModifier
Link copied to clipboard
@Immutable
class QrShapes(val code: QrCodeShape = QrCodeShape.Default, val darkPixel: QrPixelShape = QrPixelShape.Default, val lightPixel: QrPixelShape = QrPixelShape.Default, val ball: QrBallShape = QrBallShape.Default, val frame: QrFrameShape = QrFrameShape.Default, val centralSymmetry: Boolean = true)

Shapes of QR code elements

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Check if this brush is specified

Link copied to clipboard

Check if this brush is not specified

Functions

Link copied to clipboard
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 QrBallShape.Companion.circle(size: Float = 1.0f): QrBallShape
@Stable
fun QrCodeShape.Companion.circle(padding: Float = 1.1f, precise: Boolean = true, random: Random = Random(233)): QrCodeShape
Link copied to clipboard
@Stable
fun QrCodeShape.Companion.hexagon(rotation: Float = 30.0f, precise: Boolean = true, random: Random = Random(233)): QrCodeShape
Link copied to clipboard
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 QrLogoShape.Companion.oval(aspectRatio: Float): QrLogoShape
Link copied to clipboard
@Stable
fun QrOptions(block: QrOptionsBuilderScope.() -> Unit): QrOptions
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 QrLogoShape.Companion.rect(aspectRatio: Float, cornerRadius: Float = 0.0f): QrLogoShape
Link copied to clipboard
@Stable
fun QrBallShape.Companion.roundCorners(radius: Float, topLeft: Boolean = true, bottomLeft: Boolean = true, topRight: Boolean = true, bottomRight: Boolean = true): QrBallShape
@Stable
fun QrFrameShape.Companion.roundCorners(corner: Float, width: Float = 1.0f, topLeft: Boolean = true, bottomLeft: Boolean = true, topRight: Boolean = true, bottomRight: Boolean = true): QrFrameShape
Link copied to clipboard
@Stable
fun QrBrush.Companion.solid(color: Color): QrBrush

SolidColor brush from color

Link copied to clipboard
Link copied to clipboard