Source set: Android
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: Android
public 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 | the outer size of the component boundary |
| density | the remote density to apply to the shape |
| layoutDirection | the current layout direction |
| 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) |
createOutline
Source set: Android
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 |
copy
Source set: Android
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 |