LineComponent
open class LineComponent(fill: Fill, val thicknessDp: Float = Defaults.LINE_COMPONENT_THICKNESS_DP, shape: Shape = Shape.Rectangle, margins: Dimensions = Dimensions.Empty, strokeFill: Fill = Fill.Transparent, strokeThicknessDp: Float = 0.0f, shadow: Shadow? = null) : ShapeComponent
Draws lines.
Parameters
fill
the fill.
shape
the Shape.
margins
the margins.
strokeFill
the stroke fill.
strokeThicknessDp
the stroke thickness (in dp).
shadow
stores the shadow properties.
Functions
Link copied to clipboard
open override fun copy(fill: Fill, shape: Shape, margins: Dimensions, strokeFill: Fill, strokeThicknessDp: Float, shadow: Shadow?): LineComponent
open fun copy(fill: Fill = this.fill, thicknessDp: Float = this.thicknessDp, shape: Shape = this.shape, margins: Dimensions = this.margins, strokeFill: Fill = this.strokeFill, strokeThicknessDp: Float = this.strokeThicknessDp, shadow: Shadow? = this.shadow): LineComponent
Creates a new LineComponent based on this one.
Link copied to clipboard
open fun drawHorizontal(context: DrawingContext, left: Float, right: Float, centerY: Float, thicknessScale: Float = 1.0f)
A convenience function for draw that draws the LineComponent horizontally.
Link copied to clipboard
open fun drawVertical(context: DrawingContext, top: Float, bottom: Float, centerX: Float, thicknessScale: Float = 1.0f)
A convenience function for draw that draws the LineComponent vertically.
Link copied to clipboard
open fun fitsInHorizontal(context: DrawingContext, 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: DrawingContext, 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: DrawingContext, 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.