Package-level declarations

Types

Link copied to clipboard

Component is a generic concept of an object that can be drawn on a canvas at a given pair of coordinates. Its subclasses are used throughout the library.

Link copied to clipboard
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.

Link copied to clipboard
data class Shadow(radiusDp: Float, dxDp: Float = 0.0f, dyDp: Float = 0.0f, color: Int = Defaults.SHADOW_COLOR)

Stores shadow properties.

Link copied to clipboard
open class ShapeComponent(val fill: Fill = Fill.Black, val shape: Shape = Shape.Rectangle, margins: Dimensions = Dimensions.Empty, val strokeFill: Fill = Fill.Transparent, strokeThicknessDp: Float = 0.0f, shadow: Shadow? = null) : Component

Draws Shapes.

Link copied to clipboard
open class TextComponent(color: Int = Color.BLACK, typeface: Typeface = Typeface.DEFAULT, textSizeSp: Float = Defaults.TEXT_COMPONENT_TEXT_SIZE, textAlignment: Layout.Alignment = Layout.Alignment.ALIGN_NORMAL, lineHeightSp: Float? = null, lineCount: Int = TEXT_COMPONENT_LINE_COUNT, truncateAt: TextUtils.TruncateAt? = TextUtils.TruncateAt.END, margins: Dimensions = Dimensions.Empty, padding: Dimensions = Dimensions.Empty, val background: Component? = null, minWidth: TextComponent.MinWidth = MinWidth.fixed())

Uses Canvas to render text. This class utilizes StaticLayout and supports the following: