Stroke
| kotlin.Any | ||
| ↳ | androidx.compose.ui.graphics.drawscope.DrawStyle | |
| ↳ | androidx.compose.ui.graphics.drawscope.Stroke |
DrawStyle that provides information for drawing content with a stroke
Summary
Constants |
||
|---|---|---|
const Float |
DefaultMiter = 4.0fDefault miter length used in combination with joins |
Cmn
|
const Float |
HairlineWidth = 0.0fWidth to indicate a hairline stroke of 1 pixel |
Cmn
|
Public companion properties |
||
|---|---|---|
StrokeCap |
Default cap used for line endings |
Cmn
|
StrokeJoin |
Default join style used for connections between line and curve segments |
Cmn
|
Public constructors |
|
|---|---|
Stroke( |
Cmn
|
Public properties |
||
|---|---|---|
StrokeCap |
Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated. |
Cmn
|
StrokeJoin |
Set's the treatment where lines and curve segments join on a stroked path. |
Cmn
|
Float |
Set the stroke miter value. |
Cmn
|
PathEffect? |
Effect to apply to the stroke, null indicates a solid stroke line is to be drawn |
Cmn
|
Float |
Configure the width of the stroke in pixels |
Cmn
|
Constants
DefaultMiter
const val DefaultMiter = 4.0f: Float
Default miter length used in combination with joins
Public companion properties
DefaultJoin
val DefaultJoin: StrokeJoin
Default join style used for connections between line and curve segments
Public constructors
Stroke
Stroke(
width: Float = 0.0f,
miter: Float = DefaultMiter,
cap: StrokeCap = DefaultCap,
join: StrokeJoin = DefaultJoin,
pathEffect: PathEffect? = null
)
| Parameters | |
|---|---|
width: Float = 0.0f |
Configure the width of the stroke in pixels |
miter: Float = DefaultMiter |
Set the stroke miter value. This is used to control the behavior of miter joins when the joins angle is sharp. This value must be >= 0 |
cap: StrokeCap = DefaultCap |
Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated. The default is |
join: StrokeJoin = DefaultJoin |
Set's the treatment where lines and curve segments join on a stroked path. The default is |
pathEffect: PathEffect? = null |
Effect to apply to the stroke, null indicates a solid stroke line is to be drawn |
Public properties
cap
val cap: StrokeCap
Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated. The default is StrokeCap.Butt
join
val join: StrokeJoin
Set's the treatment where lines and curve segments join on a stroked path. The default is StrokeJoin.Miter
miter
val miter: Float
Set the stroke miter value. This is used to control the behavior of miter joins when the joins angle is sharp. This value must be >= 0
pathEffect
val pathEffect: PathEffect?
Effect to apply to the stroke, null indicates a solid stroke line is to be drawn