Skip to main content

2.0.0-alpha.28

This release includes bug fixes, Legend updates, and API enhancements.

Breaking changesAddressed
Minor#713, #830, #832

The following bugs have been resolved:

  • LineCartesianLayer could trigger Bitmap-related IllegalArgumentExceptions.
  • ShapeComponent.draw could call Shape.draw twice without rewinding the Path between the calls. (Now, Shape.outline—which replaces Shape.draw, as you’ll learn below—is called only once per ShapeComponent.draw run.)
2.0.0-alpha.272.0.0-alpha.28
MeasureContextMeasuringContext
DrawContextDrawingContext
CartesianMeasureContextCartesianMeasuringContext
CartesianDrawContextCartesianDrawingContext
DrawingModelCartesianLayerDrawingModel
DrawingModelInterpolatorCartesianLayerDrawingModelInterpolator
DefaultDrawingModelInterpolatorCartesianLayerDrawingModelInterpolator.default

In HorizontalLegend and VerticalLegend, the items properties and parameters now take ExtraStore lambdas:

items = rememberExtraLambda(/* ... */) {
add(LegendItem(/* ... */))
add(LegendItem(/* ... */))
}
items = rememberExtraLambda(/* ... */) { extraStore ->
extraStore[seriesDetailKey].forEach { seriesDetails ->
add(LegendItem(/* ... */))
}
}

rememberLegendItem has been removed because it’s no longer required.

The following miscellaneous changes have been made:

  • Component.draw and several protected functions no longer have opacity parameters. Opacity is now handled on the caller side. The functions in question should use the intrinsic opacity (typically 100%).
  • In Shape, draw has been replaced with outline. Shapes no longer perform any drawing—they’re responsible only for Path updates. If you’re using Shape.drawable or a custom Shape that draws something else than a Path, use Component or DynamicShader instead.