Join us for ⁠#Android11: The Beta Launch Show on June 3!

CutCornerShape

class CutCornerShape : CornerBasedShape
kotlin.Any
   ↳ androidx.ui.foundation.shape.corner.CornerBasedShape
   ↳ androidx.ui.foundation.shape.corner.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.

Summary

Public constructors

<init>(topLeft: CornerSize, topRight: CornerSize, bottomRight: CornerSize, bottomLeft: CornerSize)

A shape describing the rectangle with cut corners.

Public methods

CutCornerShape
copy(topLeft: CornerSize, topRight: CornerSize, bottomRight: CornerSize, bottomLeft: CornerSize)

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

Outline
createOutline(size: PxSize, topLeft: Px, topRight: Px, bottomRight: Px, bottomLeft: Px)

Creates Outline of this shape for the given size.

String

Inherited functions

Inherited properties

Public constructors

<init>

CutCornerShape(
    topLeft: CornerSize,
    topRight: CornerSize,
    bottomRight: CornerSize,
    bottomLeft: CornerSize)

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.

Parameters
topLeft: CornerSize a size of the top left corner
topRight: CornerSize a size of the top right corner
bottomRight: CornerSize a size of the bottom left corner
bottomLeft: CornerSize a size of the bottom right corner

Public methods

copy

fun copy(
    topLeft: CornerSize,
    topRight: CornerSize,
    bottomRight: CornerSize,
    bottomLeft: CornerSize
): CutCornerShape

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

Parameters
topLeft: CornerSize a size of the top left corner
topRight: CornerSize a size of the top right corner
bottomRight: CornerSize a size of the bottom left corner
bottomLeft: CornerSize a size of the bottom right corner

createOutline

fun createOutline(
    size: PxSize,
    topLeft: Px,
    topRight: Px,
    bottomRight: Px,
    bottomLeft: Px
): Outline

Creates Outline of this shape for the given size.

Parameters
size: PxSize the size of the shape boundary.
topLeft: Px the resolved size of the top left corner
topRight: Px the resolved size for the top right corner
bottomRight: Px the resolved size for the bottom left corner
bottomLeft: Px the resolved size for the bottom right corner

toString

fun toString(): String