abstract class RemoteCornerBasedShape : RemoteShape

Known direct subclasses
RemoteRoundedCornerShape

A shape describing the rectangle with rounded corners.


Base class for RemoteShapes defined by four RemoteCornerSizes.

See also
RemoteRoundedCornerShape

for an example of the usage.

Summary

Public constructors

RemoteCornerBasedShape(
    topStart: RemoteCornerSize,
    topEnd: RemoteCornerSize,
    bottomEnd: RemoteCornerSize,
    bottomStart: RemoteCornerSize
)

Public functions

abstract RemoteCornerBasedShape
copy(
    topStart: RemoteCornerSize,
    topEnd: RemoteCornerSize,
    bottomEnd: RemoteCornerSize,
    bottomStart: RemoteCornerSize
)

Creates a copy of this Shape with new corner sizes.

final RemoteOutline
createOutline(
    size: RemoteSize,
    density: RemoteDensity,
    layoutDirection: LayoutDirection
)

Creates RemoteOutline of this shape for the given size.

RemoteOutline
createOutline(
    size: RemoteSize,
    density: RemoteDensity,
    layoutDirection: LayoutDirection,
    strokeWidth: RemoteFloat,
    offset: RemoteOffset
)

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

abstract RemoteOutline
createOutline(
    topStart: RemoteFloat,
    topEnd: RemoteFloat,
    bottomEnd: RemoteFloat,
    bottomStart: RemoteFloat,
    size: RemoteSize?,
    offset: RemoteOffset
)

Creates RemoteOutline of this shape.

Public properties

RemoteCornerSize

a size of the bottom end corner

RemoteCornerSize

a size of the bottom start corner

RemoteCornerSize

a size of the top end corner

RemoteCornerSize

a size of the top start corner

Public constructors

RemoteCornerBasedShape

Added in 1.0.0-alpha21
RemoteCornerBasedShape(
    topStart: RemoteCornerSize,
    topEnd: RemoteCornerSize,
    bottomEnd: RemoteCornerSize,
    bottomStart: RemoteCornerSize
)
Parameters
topStart: RemoteCornerSize

a size of the top start corner

topEnd: RemoteCornerSize

a size of the top end corner

bottomEnd: RemoteCornerSize

a size of the bottom end corner

bottomStart: RemoteCornerSize

a size of the bottom start corner

Public functions

copy

Added in 1.0.0-alpha21
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: RemoteCornerSize = this.topStart

a size of the top start corner

topEnd: RemoteCornerSize = this.topEnd

a size of the top end corner

bottomEnd: RemoteCornerSize = this.bottomEnd

a size of the bottom end corner

bottomStart: RemoteCornerSize = this.bottomStart

a size of the bottom start corner

createOutline

final fun createOutline(
    size: RemoteSize,
    density: RemoteDensity,
    layoutDirection: LayoutDirection
): RemoteOutline

Creates RemoteOutline of this shape for the given size.

Parameters
size: RemoteSize

the size of the shape boundary.

density: RemoteDensity

the remote density to apply to the shape.

layoutDirection: LayoutDirection

the current layout direction.

Returns
RemoteOutline

Outline of this shape for the given size.

createOutline

Added in 1.0.0-alpha21
fun createOutline(
    size: RemoteSize,
    density: RemoteDensity,
    layoutDirection: LayoutDirection,
    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: RemoteSize

the outer size of the component boundary

density: RemoteDensity

the remote density to apply to the shape

layoutDirection: LayoutDirection

the current layout direction

strokeWidth: RemoteFloat = 0f.rf

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: RemoteOffset = RemoteOffset(strokeWidth / 2f, strokeWidth / 2f)

the top-left offset of the outline (defaults to (strokeWidth/2, strokeWidth/2) for stroked borders)

createOutline

Added in 1.0.0-alpha21
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: RemoteFloat

the resolved size of the top start corner

topEnd: RemoteFloat

the resolved size for the top end corner

bottomEnd: RemoteFloat

the resolved size for the bottom end corner

bottomStart: RemoteFloat

the resolved size for the bottom start corner

size: RemoteSize? = null

the resolved size of the shape outline

offset: RemoteOffset = RemoteOffset.Zero

the top-left offset of the shape outline

Public properties

bottomEnd

Added in 1.0.0-alpha21
val bottomEnd: RemoteCornerSize

a size of the bottom end corner

bottomStart

Added in 1.0.0-alpha21
val bottomStart: RemoteCornerSize

a size of the bottom start corner

topEnd

Added in 1.0.0-alpha21
val topEnd: RemoteCornerSize

a size of the top end corner

topStart

Added in 1.0.0-alpha21
val topStart: RemoteCornerSize

a size of the top start corner