-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
With current options we can create sample content with the following code:
val renderOption = RenderOption().apply {
content = "Sample content"
size = 400
borderWidth = 0
patternScale = 1f
clearBorder = true
color = Color().apply {
light = 0xFFFFFFFF.toInt()
dark = 0xFF000000.toInt()
background = 0xFFFFFFFF.toInt()
}
}
val result = AwesomeQrRenderer.render(renderOption)However, with a DSL this code can possibly be written in a much more clear way:
val result = awesomeQrRenderer {
content = "Sample content"
size = 400
borderWidth = 0
patternScale = 1f
clearBorder = true
color {
light = 0xFFFFFFFF.toInt()
dark = 0xFF000000.toInt()
background = 0xFFFFFFFF.toInt()
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels