androidx.compose.ui.graphics.drawscope

Stroke

Class · from org.jetbrains.compose.ui:ui-graphics:1.12.2

No hand-written docs yet.

DrawStyle that provides information for drawing content with a stroke

class Stroke(
    width: Float = 0.0f,
    miter: Float = DefaultMiter,
    cap: StrokeCap = DefaultCap,
    join: StrokeJoin = DefaultJoin,
    pathEffect: PathEffect? = null,
) : DrawStyle

Is a

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a Stroke.

Properties

HairlineWidth

const val HairlineWidth: Float

Width to indicate a hairline stroke of 1 pixel

DefaultMiter

const val DefaultMiter: Float

Default miter length used in combination with joins

DefaultCap

val DefaultCap: StrokeCap

Default cap used for line endings

DefaultJoin

val DefaultJoin: StrokeJoin

Default join style used for connections between line and curve segments

width

val width: Float

miter

val miter: Float

cap

val cap: StrokeCap

join

val join: StrokeJoin

pathEffect

val pathEffect: PathEffect?
Library docs

DrawStyle that provides information for drawing content with a stroke