RoundRect
@Immutable data class RoundRect
kotlin.Any | |
↳ | androidx.compose.ui.geometry.RoundRect |
An immutable rounded rectangle with custom radii for all four corners.
Summary
Public constructors | |
---|---|
<init>(left: Float, top: Float, right: Float, bottom: Float, topLeftCornerRadius: CornerRadius = CornerRadius.Zero, topRightCornerRadius: CornerRadius = CornerRadius.Zero, bottomRightCornerRadius: CornerRadius = CornerRadius.Zero, bottomLeftCornerRadius: CornerRadius = CornerRadius.Zero) An immutable rounded rectangle with custom radii for all four corners. |
Public methods | |
---|---|
Boolean |
Whether the point specified by the given offset (which is assumed to be relative to the origin) lies inside the rounded rectangle. |
String |
toString() |
Extension functions | ||
---|---|---|
From androidx.compose.ui.geometry
|
Properties | |
---|---|
Float |
The offset of the bottom edge of this rectangle from the y axis |
CornerRadius |
The bottom-left radius |
CornerRadius |
The bottom-right radius |
Float |
The distance between the top and bottom edges of this rectangle. |
Float |
The offset of the left edge of this rectangle from the x axis |
Float |
The offset of the right edge of this rectangle from the x axis |
Float |
The offset of the top edge of this rectangle from the y axis |
CornerRadius |
The top-left radius |
CornerRadius |
The top-right radius |
Float |
The distance between the left and right edges of this rectangle. |
Companion properties | |
---|---|
RoundRect |
A rounded rectangle with all the values set to zero. |
Extension properties | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From androidx.compose.ui.geometry
|
Public constructors
<init>
RoundRect(
left: Float,
top: Float,
right: Float,
bottom: Float,
topLeftCornerRadius: CornerRadius = CornerRadius.Zero,
topRightCornerRadius: CornerRadius = CornerRadius.Zero,
bottomRightCornerRadius: CornerRadius = CornerRadius.Zero,
bottomLeftCornerRadius: CornerRadius = CornerRadius.Zero)
An immutable rounded rectangle with custom radii for all four corners.
Public methods
contains
fun contains(point: Offset): Boolean
Whether the point specified by the given offset (which is assumed to be relative to the origin) lies inside the rounded rectangle.
This method may allocate (and cache) a copy of the object with normalized radii the first time it is called on a particular RoundRect instance. When using this method, prefer to reuse existing RoundRects rather than recreating the object each time.
toString
fun toString(): String