CornerBasedShape

abstract class CornerBasedShape : Shape
kotlin.Any
   ↳ androidx.ui.foundation.shape.corner.CornerBasedShape

Base class for Shapes defined by four CornerSizes.

Summary

Public constructors

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

Base class for Shapes defined by four CornerSizes.

Public methods

Outline
createOutline(size: PxSize, density: Density)

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

Public constructors

<init>

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

Base class for Shapes defined by four CornerSizes.

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

createOutline

fun createOutline(
    size: PxSize,
    density: Density
): Outline
Parameters
size: PxSize the size of the shape boundary.
density: Density the current density of the screen.
Return
Outline of this shape for the given size.

createOutline

abstract fun createOutline(
    size: PxSize,
    topLeft: Px,
    topRight: Px,
    bottomRight: Px,
    bottomLeft: Px
): Outline
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
Return
Outline of this shape for the given size.