LineComponent
open class LineComponent(color: Int, var thicknessDp: Float = 2.0f, shape: Shape = rectShape, dynamicShader: DynamicShader? = null, margins: Dimensions = emptyDimensions(), strokeWidthDp: Float = 0.0f, strokeColor: Int = Color.TRANSPARENT) : ShapeComponent
Draws a line.
Constructors
Link copied to clipboard
constructor(color: Int, thicknessDp: Float = 2.0f, shape: Shape = rectShape, dynamicShader: DynamicShader? = null, margins: Dimensions = emptyDimensions(), strokeWidthDp: Float = 0.0f, strokeColor: Int = Color.TRANSPARENT)
Functions
Link copied to clipboard
open fun drawHorizontal(context: DrawContext, left: Float, right: Float, centerY: Float, thicknessScale: Float = 1.0f, opacity: Float = 1.0f)
A convenience function for draw that draws the LineComponent horizontally.
Link copied to clipboard
open fun drawVertical(context: DrawContext, top: Float, bottom: Float, centerX: Float, thicknessScale: Float = 1.0f, opacity: Float = 1.0f)
A convenience function for draw that draws the LineComponent vertically.
Link copied to clipboard
open fun fitsInHorizontal(context: DrawContext, left: Float, right: Float, centerY: Float, boundingBox: RectF, thicknessScale: Float = 1.0f): Boolean
Checks whether the LineComponent fits horizontally within the given boundingBox with its current thicknessDp.
Link copied to clipboard
open fun fitsInVertical(context: DrawContext, top: Float, bottom: Float, centerX: Float, boundingBox: RectF, thicknessScale: Float = 1.0f): Boolean
Checks whether the LineComponent fits vertically within the given boundingBox with its current thicknessDp.
Link copied to clipboard
open fun intersectsVertical(context: DrawContext, top: Float, bottom: Float, centerX: Float, boundingBox: RectF, thicknessScale: Float = 1.0f): Boolean
Checks whether the LineComponent vertically intersects the given boundingBox with its current thicknessDp.