2.0.0-alpha.28
This release includes bug fixes, Legend updates, and API enhancements.
| Breaking changes | Addressed |
|---|---|
| Minor | #713, #830, #832 |
The following bugs have been resolved:
LineCartesianLayercould triggerBitmap-relatedIllegalArgumentExceptions.ShapeComponent.drawcould callShape.drawtwice without rewinding thePathbetween the calls. (Now,Shape.outline—which replacesShape.draw, as you’ll learn below—is called only once perShapeComponent.drawrun.)
- Compose
- Views
2.0.0-alpha.27 | 2.0.0-alpha.28 |
|---|---|
MeasureContext | MeasuringContext |
DrawContext | DrawingContext |
CartesianMeasureContext | CartesianMeasuringContext |
CartesianDrawContext | CartesianDrawingContext |
DrawingModel | CartesianLayerDrawingModel |
DrawingModelInterpolator | CartesianLayerDrawingModelInterpolator |
DefaultDrawingModelInterpolator | CartesianLayerDrawingModelInterpolator.default |
2.0.0-alpha.27 | 2.0.0-alpha.28 |
|---|---|
MeasureContext | MeasuringContext |
DrawContext | DrawingContext |
CartesianMeasureContext | CartesianMeasuringContext |
CartesianDrawContext | CartesianDrawingContext |
DrawingModel | CartesianLayerDrawingModel |
DrawingModelInterpolator | CartesianLayerDrawingModelInterpolator |
DefaultDrawingModelInterpolator | CartesianLayerDrawingModelInterpolator.default |
BaseCartesianLayer.axisValueOverrider | Equivalent properties in concrete CartesianLayers |
In HorizontalLegend and VerticalLegend, the items properties and parameters now take ExtraStore lambdas:
- Compose
- Views
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.
items = {
add(LegendItem(/* ... */))
add(LegendItem(/* ... */))
}
items = { extraStore ->
extraStore[seriesDetailKey].forEach { seriesDetails ->
add(LegendItem(/* ... */))
}
}
The following miscellaneous changes have been made:
- Compose
- Views
Component.drawand several protected functions no longer haveopacityparameters. Opacity is now handled on the caller side. The functions in question should use the intrinsic opacity (typically 100%).- In
Shape,drawhas been replaced withoutline.Shapes no longer perform any drawing—they’re responsible only forPathupdates. If you’re usingShape.drawableor a customShapethat draws something else than aPath, useComponentorDynamicShaderinstead.
- The class properties of
HorizontalAxisandVerticalAxisare now read-only. Instead of mutating the properties, use thecopyfunctions. - The
LineCartesianLayer.Line.capproperty has been removed, but the corresponding constructor parameter remains available. Component.drawand several protected functions no longer haveopacityparameters. Opacity is now handled on the caller side. The functions in question should use the intrinsic opacity (typically 100%).- In
Shape,drawhas been replaced withoutline.Shapes no longer perform any drawing—they’re responsible only forPathupdates. If you’re usingShape.drawableor a customShapethat draws something else than aPath, useComponentorDynamicShaderinstead.