DashedShape

class DashedShape(val shape: Shape = Shape.Rectangle, val dashLengthDp: Float = Defaults.DASH_LENGTH, val gapLengthDp: Float = Defaults.DASH_GAP, val fitStrategy: DashedShape.FitStrategy = FitStrategy.Resize) : Shape

DashedShape draws a dashed line by interchangeably drawing the provided shape and leaving a gap.

Constructors

Link copied to clipboard
constructor(shape: Shape = Shape.Rectangle, dashLengthDp: Float = Defaults.DASH_LENGTH, gapLengthDp: Float = Defaults.DASH_GAP, fitStrategy: DashedShape.FitStrategy = FitStrategy.Resize)

Types

Link copied to clipboard

Defines how a DashedShape is to be rendered.

Properties

Link copied to clipboard

the dash length in dp.

Link copied to clipboard
Link copied to clipboard

the gap length in dp.

Link copied to clipboard

the base Shape from which to create the DashedShape.

Functions

Link copied to clipboard
open override fun drawShape(context: DrawContext, paint: Paint, path: Path, left: Float, top: Float, right: Float, bottom: Float)

Draws the Shape on the canvas.