//qrcode-kotlin/qrcode.render/QRCodeGraphics/drawRoundRect
[common, android, js, jvm]
[common]
expect fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int, thickness: Double)
[android, js, jvm]
actual open fun drawRoundRect(x: Int, y: Int, width: Int, height: Int, borderRadius: Int, color: Int, thickness: Double)
Draw the edges of a round rectangle starting at point (x,y)
and having width
by height
with edges that are borderRadius
pixels round (almost like CSS).
If it helps, these would in theory draw the same thing:
// CSS
.roundRect {
width: 100px;
height: 100px;
border-radius: 5px;
}
// Kotlin
drawRoundRect(0, 0, 100, 100, 5)
Note: you can’t specify different sizes for different edges. This is just an example :)