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(
    topStart: CornerSize,
    topEnd: CornerSize,
    bottomEnd: CornerSize,
    bottomStart: CornerSize
)
Cmn

Public functions

open CutCornerShape
copy(
    topStart: CornerSize,
    topEnd: CornerSize,
    bottomEnd: CornerSize,
    bottomStart: CornerSize
)

Creates a copy of this Shape with a new corner sizes.

Cmn
open Outline
createOutline(
    size: Size,
    topStart: Float,
    topEnd: Float,
    bottomEnd: Float,
    bottomStart: Float,
    layoutDirection: LayoutDirection
)

Creates Outline of this shape for the given size.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Inherited functions

From androidx.compose.foundation.shape.CornerBasedShape
CornerBasedShape

Creates a copy of this Shape with a new corner size.

Cmn
final Outline
createOutline(
    size: Size,
    layoutDirection: LayoutDirection,
    density: Density
)

Creates Outline of this shape for the given size.

Cmn

Inherited properties

From androidx.compose.foundation.shape.CornerBasedShape
CornerSize

a size of the bottom end corner

Cmn
CornerSize

a size of the bottom start corner

Cmn
CornerSize

a size of the top end corner

Cmn
CornerSize

a size of the top start corner

Cmn

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.

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String