The Android Developer Challenge is back! Submit your idea before December 2.

CutCornerShape

data 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

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

Inherited functions

Properties

CornerSize

a size of the bottom right corner

CornerSize

a size of the bottom left corner

CornerSize

a size of the top left corner

CornerSize

a size of the top right corner

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 a size of the top left corner
topRight a size of the top right corner
bottomRight a size of the bottom left corner
bottomLeft a size of the bottom right corner

Public methods

createOutline

fun createOutline(
    size: PxSize,
    topLeft: Px,
    topRight: Px,
    bottomRight: Px,
    bottomLeft: Px
): Outline.Generic
Parameters
size: PxSize = null: PxSize the size of the shape boundary.
topLeft: Px = null: Px the resolved size of the top left corner
topRight: Px = null: Px the resolved size for the top right corner
bottomRight: Px = null: Px the resolved size for the bottom left corner
bottomLeft: Px = null: Px the resolved size for the bottom right corner
Return
Outline of this shape for the given size.

Properties

bottomLeft

val bottomLeft: CornerSize

a size of the bottom right corner

bottomRight

val bottomRight: CornerSize

a size of the bottom left corner

topLeft

val topLeft: CornerSize

a size of the top left corner

topRight

val topRight: CornerSize

a size of the top right corner