CutCornerShape
-
Cmn
class CutCornerShape : CornerBasedShape
| kotlin.Any | ||
| ↳ | androidx.compose.foundation.shape.CornerBasedShape | |
| ↳ | androidx.compose.foundation.shape.CutCornerShape |
A shape describing the rectangle with cut corners. Corner size is representing the cut length - the size of both legs of the cut's right triangle.
This shape will automatically mirror the corner sizes in LayoutDirection.Rtl, use AbsoluteCutCornerShape for the layout direction unaware version of this shape.
Summary
Public constructors |
|
|---|---|
CutCornerShape( |
Cmn
|
Public functions |
||
|---|---|---|
open CutCornerShape |
copy(Creates a copy of this Shape with a new corner sizes. |
Cmn
|
open Outline |
createOutline( |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
open Any? |
Default implementation. |
Cmn
|
open String |
toString() |
Cmn
|
Inherited functions |
||||||
|---|---|---|---|---|---|---|
|
Inherited properties |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
CutCornerShape
CutCornerShape(
topStart: CornerSize,
topEnd: CornerSize,
bottomEnd: CornerSize,
bottomStart: CornerSize
)
| Parameters | |
|---|---|
topStart: CornerSize |
a size of the top start corner |
topEnd: CornerSize |
a size of the top end corner |
bottomEnd: CornerSize |
a size of the bottom end corner |
bottomStart: CornerSize |
a size of the bottom start corner |
Public functions
copy
open fun copy(
topStart: CornerSize,
topEnd: CornerSize,
bottomEnd: CornerSize,
bottomStart: CornerSize
): CutCornerShape
Creates a copy of this Shape with a new corner sizes.
| Parameters | |
|---|---|
topStart: CornerSize |
a size of the top start corner |
topEnd: CornerSize |
a size of the top end corner |
bottomEnd: CornerSize |
a size of the bottom end corner |
bottomStart: CornerSize |
a size of the bottom start corner |
createOutline
open fun createOutline(
size: Size,
topStart: Float,
topEnd: Float,
bottomEnd: Float,
bottomStart: Float,
layoutDirection: LayoutDirection
): Outline
Creates Outline of this shape for the given size.
| Parameters | |
|---|---|
size: Size |
the size of the shape boundary. |
topStart: Float |
the resolved size of the top start corner |
topEnd: Float |
the resolved size for the top end corner |
bottomEnd: Float |
the resolved size for the bottom end corner |
bottomStart: Float |
the resolved size for the bottom start corner |
layoutDirection: LayoutDirection |
the current layout direction. |