Package-level declarations

Types

Link copied to clipboard
interface Component

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(color: Int, val thicknessDp: Float = Defaults.LINE_COMPONENT_THICKNESS_DP, shape: Shape = Shape.Rectangle, margins: Dimensions = Dimensions.Empty, strokeColor: Int = Color.TRANSPARENT, strokeThicknessDp: Float = 0.0f, shader: DynamicShader? = null, 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 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.

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, 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: