BorderStyle

data class BorderStyle(val color: ColorType, val width: Dp, val miter: Dp? = null, val cap: StrokeCap = DefaultCap, val join: StrokeJoin = DefaultJoin, val pathEffect: PathEffect? = null)

BorderStyle provides information for drawing border

Parameters

color

Configure the color of the border. Color can be solid color or gradient

width

Configure the width of the stroke in Dp

miter

Set the border stroke miter value. This is used to control the behavior of miter joins when the joins angle is sharp. This value must be >= 0.dp

cap

Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated. The default is StrokeCap.Butt

join

Set's the treatment where lines and curve segments join on a stroked path. The default is StrokeJoin.Miter

pathEffect

Effect to apply to the stroke, null indicates a solid stroke line is to be drawn

See also

Constructors

Link copied to clipboard
constructor(color: ColorType, width: Dp, miter: Dp? = null, cap: StrokeCap = DefaultCap, join: StrokeJoin = DefaultJoin, pathEffect: PathEffect? = null)

Properties

Link copied to clipboard

Styles to use for line endings. See StrokeCap.

Link copied to clipboard
Link copied to clipboard

Styles to use for line joins.

Link copied to clipboard
val miter: Dp? = null

Set the border stroke miter value.

Link copied to clipboard
val pathEffect: PathEffect? = null

Effect applied to the geometry of a drawing primitive. For example, this can be used to draw shapes as a dashed or shaped pattern, or apply a treatment around line segment intersections. See PathEffect

Link copied to clipboard
val width: Dp

To configure the width of the border in Dp