Google is committed to advancing racial equity for Black communities. See how.

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: Size, topLeft: Float, topRight: Float, bottomRight: Float, bottomLeft: Float)

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: Size,
    topLeft: Float,
    topRight: Float,
    bottomRight: Float,
    bottomLeft: Float
): Outline

Creates Outline of this shape for the given size.

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

toString

fun toString(): String