ShapeComponent

open class ShapeComponent(val color: Int = Color.BLACK, val shape: Shape = Shape.Rectangle, margins: Dimensions = Dimensions.Empty, val strokeColor: Int = Color.TRANSPARENT, strokeThicknessDp: Float = 0.0f, shader: DynamicShader? = null, shadow: Shadow? = null) : Component

Draws Shapes.

Inheritors

Constructors

Link copied to clipboard
constructor(color: Int = Color.BLACK, shape: Shape = Shape.Rectangle, margins: Dimensions = Dimensions.Empty, strokeColor: Int = Color.TRANSPARENT, strokeThicknessDp: Float = 0.0f, shader: DynamicShader? = null, shadow: Shadow? = null)

Properties

Link copied to clipboard
val color: Int

the fill color.

Link copied to clipboard

the Shape.

Link copied to clipboard

the stroke color.

Functions

Link copied to clipboard
open fun copy(color: Int = this.color, shape: Shape = this.shape, margins: Dimensions = this.margins, strokeColor: Int = this.strokeColor, strokeThicknessDp: Float = this.strokeThicknessDp, shader: DynamicShader? = this.shader, shadow: Shadow? = this.shadow): ShapeComponent

Creates a new ShapeComponent based on this one.

Link copied to clipboard
open override fun draw(context: DrawingContext, left: Float, top: Float, right: Float, bottom: Float)

Instructs the Component to draw itself at the given coordinates.