GridLines

constructor(color: Color = Color.LightGray, lineWidth: Dp = 1.dp, pathEffect: PathEffect? = null, alpha: Float = 1.0f, colorFilter: ColorFilter? = null, blendMode: BlendMode = DrawScope.DefaultBlendMode, enableHorizontalLines: Boolean = true, enableVerticalLines: Boolean = true, drawHorizontalLines: DrawScope.(Float, Float, Float) -> Unit = { xStart, y, xEnd -> drawLine( color = color, start = Offset(xStart, y), end = Offset(xEnd, y), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) }, drawVerticalLines: DrawScope.(Float, Float, Float) -> Unit = { x, yStart, yEnd -> drawLine( color = color, start = Offset(x, yStart), end = Offset(x, yEnd), strokeWidth = lineWidth.toPx(), pathEffect = pathEffect, colorFilter = colorFilter, blendMode = blendMode ) })

Parameters

color

: Defines the color of the grid lines.

lineWidth

: Defines the width of the lines.

pathEffect

optional effect or pattern to apply to the line.

alpha

Opacity to be applied to the path from 0.0f to 1.0f representing. fully transparent to fully opaque respectively.

colorFilter

ColorFilter to apply to the color when drawn into the destination.

blendMode

Blending algorithm to be applied to the path when it is drawn.

enableHorizontalLines

False to disable horizontal line else true.

enableVerticalLines

False to disable vertical lines else true.

drawHorizontalLines

Draw param used to draw the horizontal lines with given input params.

drawVerticalLines

Draw param used to draw the vertical lines with given input params.