Package-level declarations

Types

Link copied to clipboard
fun interface AdditionScope<E>

Facilitates adding elements to a collection.

Link copied to clipboard
interface Bounded

Defines an abstract component that has some physical bounds.

Link copied to clipboard
data class Dimensions(val startDp: Float = 0.0f, val topDp: Float = 0.0f, val endDp: Float = 0.0f, val bottomDp: Float = 0.0f)

Defines the size of each edge of a rectangle. Used to store measurements such as padding or margin values.

Link copied to clipboard

A MeasuringContext extension with a Canvas reference.

Link copied to clipboard
class Fill

Stores fill properties.

Link copied to clipboard

Used to apply horizontal insets.

Link copied to clipboard
open class HorizontalLegend<M : MeasuringContext, D : DrawingContext>(items: AdditionScope<LegendItem>.(ExtraStore) -> Unit, iconSizeDp: Float = Defaults.LEGEND_ICON_SIZE, iconLabelSpacingDp: Float = Defaults.LEGEND_ICON_LABEL_SPACING, rowSpacingDp: Float = Defaults.LEGEND_ROW_SPACING, columnSpacingDp: Float = Defaults.LEGEND_COLUMN_SPACING, padding: Dimensions = Dimensions.Empty) : Legend<M, D>

HorizontalLegend displays legend items beside one another in lines.

Link copied to clipboard

Defines the horizontal position of a drawn object relative to a given point.

Link copied to clipboard

Used to apply insets.

Link copied to clipboard
open class LayeredComponent(rear: Component, front: Component, padding: Dimensions = Dimensions.Empty, margins: Dimensions = Dimensions.Empty) : Component

Draws two Components, rear and front, on top of each other. padding defines the padding between them.

Link copied to clipboard

Defines the functions required by the library to draw a chart legend.

Link copied to clipboard
open class LegendItem(val icon: Component, val labelComponent: TextComponent, val label: CharSequence)

Defines the appearance of an item of a Legend.

Link copied to clipboard

Holds data used for measuring and drawing.

Link copied to clipboard
open class MutableMeasuringContext(val canvasBounds: RectF, var density: Float, var isLtr: Boolean, var spToPx: (Float) -> Float) : MeasuringContext

A MeasuringContext implementation that facilitates the mutation of some of its properties.

Link copied to clipboard
value class Point

Represents a point in a coordinate system.

Link copied to clipboard
open class VerticalLegend<M : MeasuringContext, D : DrawingContext>(items: AdditionScope<LegendItem>.(ExtraStore) -> Unit, iconSizeDp: Float = Defaults.LEGEND_ICON_SIZE, iconLabelSpacingDp: Float = Defaults.LEGEND_ICON_LABEL_SPACING, rowSpacingDp: Float = Defaults.LEGEND_ROW_SPACING, padding: Dimensions = Dimensions.Empty) : Legend<M, D>

VerticalLegend displays legend items in a vertical list.

Link copied to clipboard

Defines the vertical position of a drawn object relative to a given point.

Functions

Link copied to clipboard
fun Point(x: Float, y: Float): Point
fun Point(x: Int, y: Int): Point

Creates a new Point with the provided coordinates.