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:
LineCartesianLayer
could triggerBitmap
-relatedIllegalArgumentException
s.ShapeComponent.draw
could callShape.draw
twice without rewinding thePath
between the calls. (Now,Shape.outline
—which replacesShape.draw
, as you’ll learn below—is called only once perShapeComponent.draw
run.)
- 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 CartesianLayer s |
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.draw
and several protected functions no longer haveopacity
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 withoutline
.Shape
s no longer perform any drawing—they’re responsible only forPath
updates. If you’re usingShape.drawable
or a customShape
that draws something else than aPath
, useComponent
orDynamicShader
instead.
- The class properties of
HorizontalAxis
andVerticalAxis
are now read-only. Instead of mutating the properties, use thecopy
functions. - The
LineCartesianLayer.Line.cap
property has been removed, but the corresponding constructor parameter remains available. Component.draw
and several protected functions no longer haveopacity
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 withoutline
.Shape
s no longer perform any drawing—they’re responsible only forPath
updates. If you’re usingShape.drawable
or a customShape
that draws something else than aPath
, useComponent
orDynamicShader
instead.