drawRoundRect
abstract fun drawRoundRect(paint: Paint, x: Float = 0.0f, y: Float = 0.0f, width: Float = size.width.toFloat() - x, height: Float = size.height.toFloat() - y, cornerRadiusX: Float = 0.0f, cornerRadiusY: Float = cornerRadiusX, style: DrawStyle = DrawStyle.Fill, @FloatRange(from = 0.0, to = 1.0) alpha: Float = 1.0f)
Draws a rounded rectangle whose corners are elliptical arcs with radii cornerRadiusX and cornerRadiusY.
Parameters
paint
the paint or color used to render the rounded rectangle.
x
horizontal coordinate of the top-left corner.
y
vertical coordinate of the top-left corner.
width
width of the rectangle.
height
height of the rectangle.
cornerRadiusX
horizontal radius of the corner arcs.
cornerRadiusY
vertical radius of the corner arcs.
style
whether to fill or outline the shape.
alpha
the opacity to render with.