Class

RemoteCornerBasedShape

Base class for RemoteShapes defined by four RemoteCornerSizes.

Source set: JvmAndAndroid
public abstract class RemoteCornerBasedShape(
    public val topStart: RemoteCornerSize,
    public val topEnd: RemoteCornerSize,
    public val bottomEnd: RemoteCornerSize,
    public val bottomStart: RemoteCornerSize,
) : RemoteShape

Base class for RemoteShapes defined by four RemoteCornerSizes.

Parameters

topStart a size of the top start corner
topEnd a size of the top end corner
bottomEnd a size of the bottom end corner
bottomStart a size of the bottom start corner

Functions

createOutline

Source set: JvmAndAndroid
public fun createOutline(
        size: RemoteSize,
        layoutDirection: RemoteLayoutDirection,
        density: RemoteDensity,
        strokeWidth: RemoteFloat = 0f.rf,
        offset: RemoteOffset = RemoteOffset(strokeWidth / 2f, strokeWidth / 2f),
    ): RemoteOutline

Creates a RemoteOutline for this shape, optionally configured for drawing a stroked border.

Parameters

size the outer size of the component boundary
layoutDirection the current layout direction
density the remote density to apply to the shape
strokeWidth the stroke width of the border (0 if drawing a solid background fill). When positive, each corner radius is inset by strokeWidth / 2 and the outline bounds are inset by strokeWidth / 2 to keep the centered stroke within component bounds.
offset the top-left offset of the outline (defaults to (strokeWidth/2, strokeWidth/2) for stroked borders)

Return

the RemoteOutline for this shape

createOutline

Source set: JvmAndAndroid
public abstract fun createOutline(
        topStart: RemoteFloat,
        topEnd: RemoteFloat,
        bottomEnd: RemoteFloat,
        bottomStart: RemoteFloat,
        size: RemoteSize? = null,
        offset: RemoteOffset = RemoteOffset.Zero,
    ): RemoteOutline

Creates RemoteOutline of this shape.

Parameters

topStart the resolved size of the top start corner
topEnd the resolved size for the top end corner
bottomEnd the resolved size for the bottom end corner
bottomStart the resolved size for the bottom start corner
size the resolved size of the shape outline
offset the top-left offset of the shape outline

Return

the RemoteOutline for this shape with the resolved corner sizes

copy

Source set: JvmAndAndroid
public abstract fun copy(
        topStart: RemoteCornerSize = this.topStart,
        topEnd: RemoteCornerSize = this.topEnd,
        bottomEnd: RemoteCornerSize = this.bottomEnd,
        bottomStart: RemoteCornerSize = this.bottomStart,
    ): RemoteCornerBasedShape

Creates a copy of this Shape with new corner sizes.

Parameters

topStart a size of the top start corner
topEnd a size of the top end corner
bottomEnd a size of the bottom end corner
bottomStart a size of the bottom start corner

Return

a copy of this RemoteCornerBasedShape with the updated corner sizes

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: