Cleanup ui:ui-* and animation:animation APIs
Deprecated APIs were removed now that a few releases have passed.
Change-Id: Ie9d0239f96922f1db769c38f6f970532a8f54ff3
Relnote: "Previously Deprecated APIs were removed: Modifier.onPositioned was removed, use Modifier.onGloballyPositioned. Modifier.onDraw was removed, use Modifier.onDrawBehind. Modifier.plus was removed, use Modifier.then. Color.Unset was removed, use Color.Unspecified. PxBounds class was removed, use Rect instead."
Test: should pass
Fixes: 172562222
diff --git a/compose/animation/animation/api/current.txt b/compose/animation/animation/api/current.txt
index 0f66d6a..a14320a 100644
--- a/compose/animation/animation/api/current.txt
+++ b/compose/animation/animation/api/current.txt
@@ -108,16 +108,6 @@
}
public final class PropertyKeysKt {
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getBoundsToVectorConverter();
- method @Deprecated public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getColorToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getDpToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getIntPxPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getIntSizeToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getOffsetToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Position,androidx.compose.animation.core.AnimationVector2D> getPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getPxBoundsToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getRectToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getSizeToVectorConverter();
method public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getVectorConverter(androidx.compose.ui.graphics.Color.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.geometry.Rect.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getVectorConverter(androidx.compose.ui.unit.Dp.Companion);
@@ -125,7 +115,6 @@
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Size.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.Bounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Offset.Companion);
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.PxBounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntOffset.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntSize.Companion);
}
@@ -152,7 +141,6 @@
method @androidx.compose.runtime.Composable public static float animate(float target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animSpec, optional float visibilityThreshold, optional kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.Bounds animate(androidx.compose.ui.unit.Bounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.Bounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.Bounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.geometry.Rect animate(androidx.compose.ui.geometry.Rect target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Rect> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Rect,kotlin.Unit>? endListener);
- method @Deprecated @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.PxBounds animate(androidx.compose.ui.unit.PxBounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.PxBounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.PxBounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static int animate(int target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Integer> animSpec, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T extends androidx.compose.animation.core.AnimationVector> T animate(T target, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T, V extends androidx.compose.animation.core.AnimationVector> T! animate(T? target, androidx.compose.animation.core.TwoWayConverter<T,V> converter, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
diff --git a/compose/animation/animation/api/public_plus_experimental_current.txt b/compose/animation/animation/api/public_plus_experimental_current.txt
index 0f66d6a..a14320a 100644
--- a/compose/animation/animation/api/public_plus_experimental_current.txt
+++ b/compose/animation/animation/api/public_plus_experimental_current.txt
@@ -108,16 +108,6 @@
}
public final class PropertyKeysKt {
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getBoundsToVectorConverter();
- method @Deprecated public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getColorToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getDpToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getIntPxPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getIntSizeToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getOffsetToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Position,androidx.compose.animation.core.AnimationVector2D> getPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getPxBoundsToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getRectToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getSizeToVectorConverter();
method public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getVectorConverter(androidx.compose.ui.graphics.Color.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.geometry.Rect.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getVectorConverter(androidx.compose.ui.unit.Dp.Companion);
@@ -125,7 +115,6 @@
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Size.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.Bounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Offset.Companion);
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.PxBounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntOffset.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntSize.Companion);
}
@@ -152,7 +141,6 @@
method @androidx.compose.runtime.Composable public static float animate(float target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animSpec, optional float visibilityThreshold, optional kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.Bounds animate(androidx.compose.ui.unit.Bounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.Bounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.Bounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.geometry.Rect animate(androidx.compose.ui.geometry.Rect target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Rect> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Rect,kotlin.Unit>? endListener);
- method @Deprecated @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.PxBounds animate(androidx.compose.ui.unit.PxBounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.PxBounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.PxBounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static int animate(int target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Integer> animSpec, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T extends androidx.compose.animation.core.AnimationVector> T animate(T target, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T, V extends androidx.compose.animation.core.AnimationVector> T! animate(T? target, androidx.compose.animation.core.TwoWayConverter<T,V> converter, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
diff --git a/compose/animation/animation/api/restricted_current.txt b/compose/animation/animation/api/restricted_current.txt
index 0f66d6a..a14320a 100644
--- a/compose/animation/animation/api/restricted_current.txt
+++ b/compose/animation/animation/api/restricted_current.txt
@@ -108,16 +108,6 @@
}
public final class PropertyKeysKt {
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getBoundsToVectorConverter();
- method @Deprecated public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getColorToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getDpToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getIntPxPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getIntSizeToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getOffsetToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Position,androidx.compose.animation.core.AnimationVector2D> getPositionToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getPxBoundsToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getRectToVectorConverter();
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getSizeToVectorConverter();
method public static kotlin.jvm.functions.Function1<androidx.compose.ui.graphics.colorspace.ColorSpace,androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.graphics.Color,androidx.compose.animation.core.AnimationVector4D>> getVectorConverter(androidx.compose.ui.graphics.Color.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Rect,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.geometry.Rect.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Dp,androidx.compose.animation.core.AnimationVector1D> getVectorConverter(androidx.compose.ui.unit.Dp.Companion);
@@ -125,7 +115,6 @@
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Size,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Size.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.Bounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.Bounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.geometry.Offset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.geometry.Offset.Companion);
- method @Deprecated public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.PxBounds,androidx.compose.animation.core.AnimationVector4D> getVectorConverter(androidx.compose.ui.unit.PxBounds.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntOffset,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntOffset.Companion);
method public static androidx.compose.animation.core.TwoWayConverter<androidx.compose.ui.unit.IntSize,androidx.compose.animation.core.AnimationVector2D> getVectorConverter(androidx.compose.ui.unit.IntSize.Companion);
}
@@ -152,7 +141,6 @@
method @androidx.compose.runtime.Composable public static float animate(float target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Float> animSpec, optional float visibilityThreshold, optional kotlin.jvm.functions.Function1<? super java.lang.Float,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.Bounds animate(androidx.compose.ui.unit.Bounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.Bounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.Bounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static androidx.compose.ui.geometry.Rect animate(androidx.compose.ui.geometry.Rect target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.geometry.Rect> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.geometry.Rect,kotlin.Unit>? endListener);
- method @Deprecated @androidx.compose.runtime.Composable public static androidx.compose.ui.unit.PxBounds animate(androidx.compose.ui.unit.PxBounds target, optional androidx.compose.animation.core.AnimationSpec<androidx.compose.ui.unit.PxBounds> animSpec, optional kotlin.jvm.functions.Function1<? super androidx.compose.ui.unit.PxBounds,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static int animate(int target, optional androidx.compose.animation.core.AnimationSpec<java.lang.Integer> animSpec, optional kotlin.jvm.functions.Function1<? super java.lang.Integer,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T extends androidx.compose.animation.core.AnimationVector> T animate(T target, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
method @androidx.compose.runtime.Composable public static <T, V extends androidx.compose.animation.core.AnimationVector> T! animate(T? target, androidx.compose.animation.core.TwoWayConverter<T,V> converter, optional androidx.compose.animation.core.AnimationSpec<T> animSpec, optional T? visibilityThreshold, optional kotlin.jvm.functions.Function1<? super T,kotlin.Unit>? endListener);
diff --git a/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/SingleValueAnimationTest.kt b/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/SingleValueAnimationTest.kt
index b6fd6bc..c60995d4 100644
--- a/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/SingleValueAnimationTest.kt
+++ b/compose/animation/animation/src/androidAndroidTest/kotlin/androidx/compose/animation/SingleValueAnimationTest.kt
@@ -36,7 +36,6 @@
import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.unit.Bounds
import androidx.compose.ui.unit.Position
-import androidx.compose.ui.unit.PxBounds
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.lerp
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -236,7 +235,6 @@
var vectorValue = startVal
var boundsValue = Bounds.VectorConverter.convertFromVector(startVal)
- var pxBoundsValue = PxBounds.VectorConverter.convertFromVector(startVal)
fun <V> tween(): TweenSpec<V> =
TweenSpec(
@@ -257,14 +255,6 @@
Bounds.VectorConverter.convertFromVector(startVal),
tween()
)
-
- pxBoundsValue = animate(
- if (enabled)
- PxBounds.VectorConverter.convertFromVector(endVal)
- else
- PxBounds.VectorConverter.convertFromVector(startVal),
- tween()
- )
}
val verify: () -> Unit = {
@@ -279,7 +269,6 @@
assertEquals(expect, vectorValue)
assertEquals(Bounds.VectorConverter.convertFromVector(expect), boundsValue)
- assertEquals(PxBounds.VectorConverter.convertFromVector(expect), pxBoundsValue)
rule.clockTestRule.advanceClock(50)
rule.waitForIdle()
}
diff --git a/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/PropertyKeys.kt b/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/PropertyKeys.kt
index 7e1a622..bfc1b0d 100644
--- a/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/PropertyKeys.kt
+++ b/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/PropertyKeys.kt
@@ -33,7 +33,6 @@
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.Position
-import androidx.compose.ui.unit.PxBounds
import androidx.compose.ui.unit.dp
import kotlin.math.roundToInt
@@ -174,17 +173,6 @@
convertToVector = { AnimationVector2D(it.x, it.y) },
convertFromVector = { Offset(it.v1, it.v2) }
)
-/**
- * A type converter that converts a [PxBounds] to a [AnimationVector4D], and vice versa.
- */
-@Suppress("DEPRECATION")
-private val PxBoundsToVector: TwoWayConverter<PxBounds, AnimationVector4D> =
- TwoWayConverter(
- convertToVector = {
- AnimationVector4D(it.left, it.top, it.right, it.bottom)
- },
- convertFromVector = { PxBounds(it.v1, it.v2, it.v3, it.v4) }
- )
/**
* A type converter that converts a [IntOffset] to a [AnimationVector2D], and vice versa.
@@ -214,140 +202,49 @@
get() = ColorToVector
/**
- * A lambda that takes a [ColorSpace] and returns a converter that can both convert a [Color] to
- * a [AnimationVector4D], and convert a [AnimationVector4D]) back to a [Color] in the given
- * [ColorSpace].
- * @see [Color.Companion.VectorConverter]
- */
-@Deprecated("", ReplaceWith("Color.VectorConverter"))
-val ColorToVectorConverter: (colorSpace: ColorSpace) -> TwoWayConverter<Color, AnimationVector4D> =
- Color.VectorConverter
-
-/**
* A type converter that converts a [Rect] to a [AnimationVector4D], and vice versa.
*/
val Rect.Companion.VectorConverter: TwoWayConverter<Rect, AnimationVector4D>
get() = RectToVector
/**
- * A type converter that converts a [Rect] to a [AnimationVector4D], and vice versa.
- * @see [Rect.Companion.VectorConverter]
- */
-@Deprecated("", ReplaceWith("Rect.VectorConverter"))
-val RectToVectorConverter: TwoWayConverter<Rect, AnimationVector4D> = Rect.VectorConverter
-
-/**
* A type converter that converts a [Dp] to a [AnimationVector1D], and vice versa.
*/
val Dp.Companion.VectorConverter: TwoWayConverter<Dp, AnimationVector1D>
get() = DpToVector
/**
- * A type converter that converts a [Dp] to a [AnimationVector1D], and vice versa.
- * @see [Dp.Companion.VectorConverter]
- */
-@Deprecated("", ReplaceWith("Dp.VectorConverter"))
-val DpToVectorConverter: TwoWayConverter<Dp, AnimationVector1D> = Dp.VectorConverter
-
-/**
* A type converter that converts a [Position] to a [AnimationVector2D], and vice versa.
*/
val Position.Companion.VectorConverter: TwoWayConverter<Position, AnimationVector2D>
get() = PositionToVector
/**
- * A type converter that converts a [Position] to a [AnimationVector2D], and vice versa.
- * @see [Position.Companion.VectorConverter]
- */
-@Deprecated("", ReplaceWith("Position.VectorConverter"))
-val PositionToVectorConverter: TwoWayConverter<Position, AnimationVector2D> =
- Position.VectorConverter
-
-/**
* A type converter that converts a [Size] to a [AnimationVector2D], and vice versa.
*/
val Size.Companion.VectorConverter: TwoWayConverter<Size, AnimationVector2D>
get() = SizeToVector
/**
- * A type converter that converts a [Size] to a [AnimationVector2D], and vice versa.
- * @see [Size.Companion.VectorConverter]
- */
-@Deprecated("", ReplaceWith("Size.VectorConverter"))
-val SizeToVectorConverter: TwoWayConverter<Size, AnimationVector2D> =
- Size.VectorConverter
-/**
* A type converter that converts a [Bounds] to a [AnimationVector4D], and vice versa.
*/
val Bounds.Companion.VectorConverter: TwoWayConverter<Bounds, AnimationVector4D>
get() = BoundsToVector
/**
- * A type converter that converts a [Bounds] to a [AnimationVector4D], and vice versa.
- * @see Bounds.Companion.VectorConverter
- */
-@Deprecated("", ReplaceWith("Bounds.VectorConverter"))
-val BoundsToVectorConverter: TwoWayConverter<Bounds, AnimationVector4D> =
- Bounds.VectorConverter
-
-/**
* A type converter that converts a [Offset] to a [AnimationVector2D], and vice versa.
*/
val Offset.Companion.VectorConverter: TwoWayConverter<Offset, AnimationVector2D>
get() = OffsetToVector
/**
- * A type converter that converts a [Offset] to a [AnimationVector2D], and vice versa.
- * @see Offset.Companion.VectorConverter
- */
-@Deprecated("", ReplaceWith("Offset.VectorConverter"))
-val OffsetToVectorConverter: TwoWayConverter<Offset, AnimationVector2D> =
- Offset.VectorConverter
-
-/**
- * A type converter that converts a [PxBounds] to a [AnimationVector4D], and vice versa.
- * @see Rect.Companion.VectorConverter
- */
-@Deprecated(
- "Use Rect and RectToVectorConverter instead",
- ReplaceWith("Rect.VectorConverter")
-)
-@Suppress("DEPRECATION")
-val PxBounds.Companion.VectorConverter: TwoWayConverter<PxBounds, AnimationVector4D>
- get() = PxBoundsToVector
-
-/**
- * A type converter that converts a [PxBounds] to a [AnimationVector4D], and vice versa.
- * @see Rect.Companion.VectorConverter
- */
-@Deprecated("", ReplaceWith("Rect.VectorConverter"))
-@Suppress("DEPRECATION")
-val PxBoundsToVectorConverter: TwoWayConverter<PxBounds, AnimationVector4D> =
- PxBounds.VectorConverter
-
-/**
* A type converter that converts a [IntOffset] to a [AnimationVector2D], and vice versa.
*/
val IntOffset.Companion.VectorConverter: TwoWayConverter<IntOffset, AnimationVector2D>
get() = IntOffsetToVector
/**
- * A type converter that converts a [IntOffset] to a [AnimationVector2D], and vice versa.
- * @see IntOffset.Companion.VectorConverter
- */
-@Deprecated("", ReplaceWith("IntOffset.VectorConverter"))
-val IntPxPositionToVectorConverter: TwoWayConverter<IntOffset, AnimationVector2D> =
- IntOffset.VectorConverter
-
-/**
* A type converter that converts a [IntSize] to a [AnimationVector2D], and vice versa.
*/
val IntSize.Companion.VectorConverter: TwoWayConverter<IntSize, AnimationVector2D>
- get() = IntSizeToVector
-
-/**
- * A type converter that converts a [IntSize] to a [AnimationVector2D], and vice versa.
- * @see IntSize.Companion.VectorConverter
- */
-@Deprecated("", ReplaceWith("IntSize.VectorConverter"))
-val IntSizeToVectorConverter: TwoWayConverter<IntSize, AnimationVector2D> = IntSize.VectorConverter
+ get() = IntSizeToVector
\ No newline at end of file
diff --git a/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/SingleValueAnimation.kt b/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/SingleValueAnimation.kt
index bb63f17..2854a61 100644
--- a/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/SingleValueAnimation.kt
+++ b/compose/animation/animation/src/commonMain/kotlin/androidx/compose/animation/SingleValueAnimation.kt
@@ -36,7 +36,6 @@
import androidx.compose.ui.unit.IntOffset
import androidx.compose.ui.unit.IntSize
import androidx.compose.ui.unit.Position
-import androidx.compose.ui.unit.PxBounds
import androidx.compose.ui.unit.dp
internal const val DpVisibilityThreshold = 0.1f
@@ -315,48 +314,6 @@
}
/**
- * Fire-and-forget animation [Composable] for [PxBounds]. Once such an animation is created, it will
- * be positionally memoized, like other @[Composable]s. To trigger the animation, or alter the
- * course of the animation, simply supply a different [target] to the [Composable].
- *
- * Note, [animate] is for simple animations that cannot be canceled. For cancellable animations
- * see [animatedValue].
- *
- * val bounds : PxBounds = animate(
- * if (enabled) PxBounds(0.px, 0.px, 100.px, 100.px) else PxBounds(8.px, 8.px, 80.px, 80.px))
- *
- * @param target Target value of the animation
- * @param animSpec The animation that will be used to change the value through time. Physics
- * animation will be used by default.
- * @param endListener An optional end listener to get notified when the animation is finished.
- */
-@Deprecated(
- "Consider usage of Rect instead",
- ReplaceWith(
- "animate(target: Rect, animSpec: AnimationSpec<Rect>, " +
- "endListener: ((Rect) -> " +
- "Unit)?",
- "androidx.compose.animation.animation"
- )
-)
-@Suppress("DEPRECATION")
-@Composable
-fun animate(
- target: PxBounds,
- animSpec: AnimationSpec<PxBounds> = remember {
- SpringSpec(
- visibilityThreshold =
- PxBounds.VectorConverter.convertFromVector(PxVisibilityThreshold4D)
- )
- },
- endListener: ((PxBounds) -> Unit)? = null
-): PxBounds {
- return animate(
- target, PxBounds.VectorConverter, animSpec, endListener = endListener
- )
-}
-
-/**
* Fire-and-forget animation [Composable] for [Int]. Once such an animation is created, it
* will be positionally memoized, like other @[Composable]s. To trigger the animation, or alter the
* course of the animation, simply supply a different [target] to the [Composable].
diff --git a/compose/ui/ui-geometry/api/current.txt b/compose/ui/ui-geometry/api/current.txt
index 8135cb2..25c687e 100644
--- a/compose/ui/ui-geometry/api/current.txt
+++ b/compose/ui/ui-geometry/api/current.txt
@@ -28,7 +28,6 @@
public final class CornerRadiusKt {
method @androidx.compose.runtime.Stable public static inline long CornerRadius(float x, optional float y);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long Radius(float x, optional float y);
method @androidx.compose.runtime.Stable public static long lerp-LCIZJP8(long start, long stop, float fraction);
}
@@ -134,7 +133,6 @@
method public boolean isFinite();
method public boolean isInfinite();
method public boolean overlaps(androidx.compose.ui.geometry.Rect other);
- method @Deprecated @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect shift-k-4lQ0M(long offset);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate(float translateX, float translateY);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate-k-4lQ0M(long offset);
property public final float bottom;
@@ -219,16 +217,11 @@
method public static androidx.compose.ui.geometry.RoundRect RoundRect--YCCMLI(androidx.compose.ui.geometry.Rect rect, optional long topLeft, optional long topRight, optional long bottomRight, optional long bottomLeft);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-fCQrIv8(float left, float top, float right, float bottom, long cornerRadius);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-v2DAv8c(androidx.compose.ui.geometry.Rect rect, long cornerRadius);
- method @Deprecated public static long bottomLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long bottomRightRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long center(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getBoundingRect(androidx.compose.ui.geometry.RoundRect);
method public static long getCenter(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getLongestSide(androidx.compose.ui.geometry.RoundRect);
method public static float getMaxDimension(androidx.compose.ui.geometry.RoundRect);
method public static float getMinDimension(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getSafeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getShortestSide(androidx.compose.ui.geometry.RoundRect);
method public static boolean isCircle(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEllipse(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEmpty(androidx.compose.ui.geometry.RoundRect);
@@ -236,11 +229,6 @@
method public static boolean isRect(androidx.compose.ui.geometry.RoundRect);
method public static boolean isSimple(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect lerp(androidx.compose.ui.geometry.RoundRect start, androidx.compose.ui.geometry.RoundRect stop, float fraction);
- method @Deprecated public static androidx.compose.ui.geometry.Rect outerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.Rect safeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.RoundRect shift-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
- method @Deprecated public static long topLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long topRightRadius(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect translate-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
}
diff --git a/compose/ui/ui-geometry/api/public_plus_experimental_current.txt b/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
index 8135cb2..25c687e 100644
--- a/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-geometry/api/public_plus_experimental_current.txt
@@ -28,7 +28,6 @@
public final class CornerRadiusKt {
method @androidx.compose.runtime.Stable public static inline long CornerRadius(float x, optional float y);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long Radius(float x, optional float y);
method @androidx.compose.runtime.Stable public static long lerp-LCIZJP8(long start, long stop, float fraction);
}
@@ -134,7 +133,6 @@
method public boolean isFinite();
method public boolean isInfinite();
method public boolean overlaps(androidx.compose.ui.geometry.Rect other);
- method @Deprecated @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect shift-k-4lQ0M(long offset);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate(float translateX, float translateY);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate-k-4lQ0M(long offset);
property public final float bottom;
@@ -219,16 +217,11 @@
method public static androidx.compose.ui.geometry.RoundRect RoundRect--YCCMLI(androidx.compose.ui.geometry.Rect rect, optional long topLeft, optional long topRight, optional long bottomRight, optional long bottomLeft);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-fCQrIv8(float left, float top, float right, float bottom, long cornerRadius);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-v2DAv8c(androidx.compose.ui.geometry.Rect rect, long cornerRadius);
- method @Deprecated public static long bottomLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long bottomRightRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long center(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getBoundingRect(androidx.compose.ui.geometry.RoundRect);
method public static long getCenter(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getLongestSide(androidx.compose.ui.geometry.RoundRect);
method public static float getMaxDimension(androidx.compose.ui.geometry.RoundRect);
method public static float getMinDimension(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getSafeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getShortestSide(androidx.compose.ui.geometry.RoundRect);
method public static boolean isCircle(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEllipse(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEmpty(androidx.compose.ui.geometry.RoundRect);
@@ -236,11 +229,6 @@
method public static boolean isRect(androidx.compose.ui.geometry.RoundRect);
method public static boolean isSimple(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect lerp(androidx.compose.ui.geometry.RoundRect start, androidx.compose.ui.geometry.RoundRect stop, float fraction);
- method @Deprecated public static androidx.compose.ui.geometry.Rect outerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.Rect safeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.RoundRect shift-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
- method @Deprecated public static long topLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long topRightRadius(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect translate-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
}
diff --git a/compose/ui/ui-geometry/api/restricted_current.txt b/compose/ui/ui-geometry/api/restricted_current.txt
index 8135cb2..25c687e 100644
--- a/compose/ui/ui-geometry/api/restricted_current.txt
+++ b/compose/ui/ui-geometry/api/restricted_current.txt
@@ -28,7 +28,6 @@
public final class CornerRadiusKt {
method @androidx.compose.runtime.Stable public static inline long CornerRadius(float x, optional float y);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long Radius(float x, optional float y);
method @androidx.compose.runtime.Stable public static long lerp-LCIZJP8(long start, long stop, float fraction);
}
@@ -134,7 +133,6 @@
method public boolean isFinite();
method public boolean isInfinite();
method public boolean overlaps(androidx.compose.ui.geometry.Rect other);
- method @Deprecated @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect shift-k-4lQ0M(long offset);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate(float translateX, float translateY);
method @androidx.compose.runtime.Stable public androidx.compose.ui.geometry.Rect translate-k-4lQ0M(long offset);
property public final float bottom;
@@ -219,16 +217,11 @@
method public static androidx.compose.ui.geometry.RoundRect RoundRect--YCCMLI(androidx.compose.ui.geometry.Rect rect, optional long topLeft, optional long topRight, optional long bottomRight, optional long bottomLeft);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-fCQrIv8(float left, float top, float right, float bottom, long cornerRadius);
method public static androidx.compose.ui.geometry.RoundRect RoundRect-v2DAv8c(androidx.compose.ui.geometry.Rect rect, long cornerRadius);
- method @Deprecated public static long bottomLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long bottomRightRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long center(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getBoundingRect(androidx.compose.ui.geometry.RoundRect);
method public static long getCenter(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getLongestSide(androidx.compose.ui.geometry.RoundRect);
method public static float getMaxDimension(androidx.compose.ui.geometry.RoundRect);
method public static float getMinDimension(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.Rect getSafeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static float getShortestSide(androidx.compose.ui.geometry.RoundRect);
method public static boolean isCircle(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEllipse(androidx.compose.ui.geometry.RoundRect);
method public static boolean isEmpty(androidx.compose.ui.geometry.RoundRect);
@@ -236,11 +229,6 @@
method public static boolean isRect(androidx.compose.ui.geometry.RoundRect);
method public static boolean isSimple(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect lerp(androidx.compose.ui.geometry.RoundRect start, androidx.compose.ui.geometry.RoundRect stop, float fraction);
- method @Deprecated public static androidx.compose.ui.geometry.Rect outerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.Rect safeInnerRect(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static androidx.compose.ui.geometry.RoundRect shift-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
- method @Deprecated public static long topLeftRadius(androidx.compose.ui.geometry.RoundRect);
- method @Deprecated public static long topRightRadius(androidx.compose.ui.geometry.RoundRect);
method public static androidx.compose.ui.geometry.RoundRect translate-cBI5anY(androidx.compose.ui.geometry.RoundRect, long offset);
}
diff --git a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/CornerRadius.kt b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/CornerRadius.kt
index c594567..44afb95 100644
--- a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/CornerRadius.kt
+++ b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/CornerRadius.kt
@@ -35,23 +35,6 @@
inline fun CornerRadius(x: Float, y: Float = x) = CornerRadius(packFloats(x, y))
/**
- * Constructs a Radius with the given [x] and [y] parameters for the
- * size of the radius along the x and y axis respectively. By default
- * the radius along the Y axis matches that of the given x-axis
- * unless otherwise specified
- */
-@Suppress("NOTHING_TO_INLINE")
-@Stable
-@Deprecated(
- "Use CornerRadius(x, y) instead",
- ReplaceWith(
- "CornerRadius(x, y)",
- "androidx.compose.ui.geometry"
- )
-)
-inline fun Radius(x: Float, y: Float = x) = CornerRadius(packFloats(x, y))
-
-/**
* A radius for either circular or elliptical (oval) shapes.
*
* Note consumers should create an instance of this class through the corresponding
diff --git a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/Rect.kt b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/Rect.kt
index b007b67..cd0a540 100644
--- a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/Rect.kt
+++ b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/Rect.kt
@@ -112,21 +112,6 @@
* To translate a rectangle by separate x and y components rather than by an
* [Offset], consider [translate].
*/
- @Deprecated(
- "Use translate(offset) instead",
- ReplaceWith("translate(offset)", "androidx.compose.ui.geometry")
- )
- @Stable
- fun shift(offset: Offset): Rect {
- return Rect(left + offset.x, top + offset.y, right + offset.x, bottom + offset.y)
- }
-
- /**
- * Returns a new rectangle translated by the given offset.
- *
- * To translate a rectangle by separate x and y components rather than by an
- * [Offset], consider [translate].
- */
@Stable
fun translate(offset: Offset): Rect {
return Rect(left + offset.x, top + offset.y, right + offset.x, bottom + offset.y)
diff --git a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/RoundRect.kt b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/RoundRect.kt
index 54277c9..962191c 100644
--- a/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/RoundRect.kt
+++ b/compose/ui/ui-geometry/src/commonMain/kotlin/androidx/compose/ui/geometry/RoundRect.kt
@@ -307,42 +307,6 @@
bottomLeftCornerRadius = bottomLeft
)
-/** The top-left [CornerRadius]. */
-@Deprecated(
- "use topLeftRadius instead",
- ReplaceWith("topLeftRadius", "androidx.compose.ui.geometry")
-)
-fun RoundRect.topLeftRadius(): CornerRadius = topLeftCornerRadius
-
-/** The top-right [CornerRadius]. */
-@Deprecated(
- "Use topRightRadius instead",
- ReplaceWith("topRightRadius", "androidx.compose.ui.geometry")
-)
-fun RoundRect.topRightRadius(): CornerRadius = topRightCornerRadius
-
-/** The bottom-right [CornerRadius]. */
-@Deprecated(
- "Use bottomRightRadius instead",
- ReplaceWith("bottomRightRadius", "androidx.compose.ui.geometry")
-)
-fun RoundRect.bottomRightRadius(): CornerRadius = bottomRightCornerRadius
-
-/** The bottom-right [CornerRadius]. */
-@Deprecated(
- "Use bottomLeftRadius instead",
- ReplaceWith("bottomLeftRadius", "androidx.compose.ui.geometry")
-)
-/** The bottom-left [CornerRadius]. */
-fun RoundRect.bottomLeftRadius(): CornerRadius = bottomLeftCornerRadius
-
-/** Returns a new [RoundRect] translated by the given offset. */
-@Deprecated(
- "Use translate(offset) instead",
- ReplaceWith("translate(offset)", "androidx.compose.ui.RoundRect")
-)
-fun RoundRect.shift(offset: Offset): RoundRect = translate(offset)
-
/** Returns a new [RoundRect] translated by the given offset. */
fun RoundRect.translate(offset: Offset): RoundRect = RoundRect(
left = left + offset.x,
@@ -355,13 +319,6 @@
bottomLeftCornerRadius = bottomLeftCornerRadius
)
-@Deprecated(
- "Use outerRect instead",
- ReplaceWith("boundingRect", "androidx.compose.ui.RoundRect")
-)
-/** The bounding box of this rounded rectangle (the rectangle with no rounded corners). */
-fun RoundRect.outerRect(): Rect = boundingRect
-
/** The bounding box of this rounded rectangle (the rectangle with no rounded corners). */
val RoundRect.boundingRect: Rect get() = Rect(left, top, right, bottom)
@@ -371,18 +328,6 @@
* corners. The middle of a corner is the intersection of the curve with its
* respective quadrant bisector.
*/
-@Deprecated(
- "Use safeInnerRect instead",
- ReplaceWith("safeInnerRect", "androidx.compose.ui.RoundRect")
-)
-fun RoundRect.safeInnerRect(): Rect = safeInnerRect
-
-/**
- * The non-rounded rectangle that is constrained by the smaller of the two
- * diagonals, with each diagonal traveling through the middle of the curve
- * corners. The middle of a corner is the intersection of the curve with its
- * respective quadrant bisector.
- */
val RoundRect.safeInnerRect: Rect
get() {
val insetFactor = 0.29289321881f // 1-cos(pi/4)
@@ -438,44 +383,14 @@
* The lesser of the magnitudes of the [RoundRect.width] and the [RoundRect.height] of this
* rounded rectangle.
*/
-@Deprecated(
- "Use minDimension instead",
- ReplaceWith("minDimension", "androidx.compose.ui.RoundRect")
-)
-val RoundRect.shortestSide get(): Float = minDimension
-
-/**
- * The lesser of the magnitudes of the [RoundRect.width] and the [RoundRect.height] of this
- * rounded rectangle.
- */
val RoundRect.minDimension get(): Float = min(width.absoluteValue, height.absoluteValue)
-/**
- * The greater of the magnitudes of the [RoundRect.width] and the [RoundRect.height] of this
- * rounded rectangle.
- */
-@Deprecated(
- "Use maxDimension instead",
- ReplaceWith("maxDimension", "androidx.compose.ui.RoundRect")
-)
-val RoundRect.longestSide get(): Float = maxDimension
-
val RoundRect.maxDimension get(): Float = max(width.absoluteValue, height.absoluteValue)
/**
* The offset to the point halfway between the left and right and the top and
* bottom edges of this rectangle.
*/
-@Deprecated(
- "Use center instead",
- ReplaceWith("center", "androidx.compose.ui.RoundRect")
-)
-fun RoundRect.center(): Offset = Offset((left + width / 2.0f), (top + height / 2.0f))
-
-/**
- * The offset to the point halfway between the left and right and the top and
- * bottom edges of this rectangle.
- */
val RoundRect.center: Offset get() = Offset((left + width / 2.0f), (top + height / 2.0f))
/**
diff --git a/compose/ui/ui-graphics/api/current.txt b/compose/ui/ui-graphics/api/current.txt
index 2c81a4d..82b07b5 100644
--- a/compose/ui/ui-graphics/api/current.txt
+++ b/compose/ui/ui-graphics/api/current.txt
@@ -265,7 +265,6 @@
method public long getMagenta-0d7_KjU();
method public long getRed-0d7_KjU();
method public long getTransparent-0d7_KjU();
- method @Deprecated public long getUnset-0d7_KjU();
method public long getUnspecified-0d7_KjU();
method public long getWhite-0d7_KjU();
method public long getYellow-0d7_KjU();
@@ -279,7 +278,6 @@
property public final long Magenta;
property public final long Red;
property public final long Transparent;
- property @Deprecated public final long Unset;
property public final long Unspecified;
property public final long White;
property public final long Yellow;
@@ -306,9 +304,7 @@
method @androidx.compose.runtime.Stable public static long Color(long color);
method @androidx.compose.runtime.Stable public static long Color(@IntRange(from=0, to=255) int red, @IntRange(from=0, to=255) int green, @IntRange(from=0, to=255) int blue, optional @IntRange(from=0, to=255) int alpha);
method @androidx.compose.runtime.Stable public static long compositeOver-6xK2E-Q(long, long background);
- method @Deprecated public static inline boolean isSet-8_81llA(long);
method public static inline boolean isSpecified-8_81llA(long);
- method @Deprecated public static inline boolean isUnset-8_81llA(long);
method public static inline boolean isUnspecified-8_81llA(long);
method @androidx.compose.runtime.Stable public static long lerp-m18UwgE(long start, long stop, @FloatRange(from=0.0, to=1.0) float fraction);
method @androidx.compose.runtime.Stable public static float luminance-8_81llA(long);
@@ -481,7 +477,6 @@
method public void addArcRad(androidx.compose.ui.geometry.Rect oval, float startAngleRadians, float sweepAngleRadians);
method public void addOval(androidx.compose.ui.geometry.Rect oval);
method public void addPath-ej0GBII(androidx.compose.ui.graphics.Path path, optional long offset);
- method @Deprecated public default void addRRect(androidx.compose.ui.geometry.RoundRect rrect);
method public void addRect(androidx.compose.ui.geometry.Rect rect);
method public void addRoundRect(androidx.compose.ui.geometry.RoundRect roundRect);
method public void arcTo(androidx.compose.ui.geometry.Rect rect, float startAngleDegrees, float sweepAngleDegrees, boolean forceMoveTo);
@@ -502,7 +497,6 @@
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
method public void setFillType(androidx.compose.ui.graphics.PathFillType p);
- method @Deprecated public default void shift-k-4lQ0M(long offset);
method public void translate-k-4lQ0M(long offset);
property public abstract androidx.compose.ui.graphics.PathFillType fillType;
property public abstract boolean isConvex;
@@ -941,7 +935,6 @@
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, float inset, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, optional float horizontal, optional float vertical, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotate-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float degrees, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
- method @Deprecated public static inline void rotateRad(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional float pivotX, optional float pivotY, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotateRad-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float scale, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-LCqtnZ0(androidx.compose.ui.graphics.drawscope.DrawScope, float scaleX, float scaleY, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
diff --git a/compose/ui/ui-graphics/api/public_plus_experimental_current.txt b/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
index 2c81a4d..82b07b5 100644
--- a/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-graphics/api/public_plus_experimental_current.txt
@@ -265,7 +265,6 @@
method public long getMagenta-0d7_KjU();
method public long getRed-0d7_KjU();
method public long getTransparent-0d7_KjU();
- method @Deprecated public long getUnset-0d7_KjU();
method public long getUnspecified-0d7_KjU();
method public long getWhite-0d7_KjU();
method public long getYellow-0d7_KjU();
@@ -279,7 +278,6 @@
property public final long Magenta;
property public final long Red;
property public final long Transparent;
- property @Deprecated public final long Unset;
property public final long Unspecified;
property public final long White;
property public final long Yellow;
@@ -306,9 +304,7 @@
method @androidx.compose.runtime.Stable public static long Color(long color);
method @androidx.compose.runtime.Stable public static long Color(@IntRange(from=0, to=255) int red, @IntRange(from=0, to=255) int green, @IntRange(from=0, to=255) int blue, optional @IntRange(from=0, to=255) int alpha);
method @androidx.compose.runtime.Stable public static long compositeOver-6xK2E-Q(long, long background);
- method @Deprecated public static inline boolean isSet-8_81llA(long);
method public static inline boolean isSpecified-8_81llA(long);
- method @Deprecated public static inline boolean isUnset-8_81llA(long);
method public static inline boolean isUnspecified-8_81llA(long);
method @androidx.compose.runtime.Stable public static long lerp-m18UwgE(long start, long stop, @FloatRange(from=0.0, to=1.0) float fraction);
method @androidx.compose.runtime.Stable public static float luminance-8_81llA(long);
@@ -481,7 +477,6 @@
method public void addArcRad(androidx.compose.ui.geometry.Rect oval, float startAngleRadians, float sweepAngleRadians);
method public void addOval(androidx.compose.ui.geometry.Rect oval);
method public void addPath-ej0GBII(androidx.compose.ui.graphics.Path path, optional long offset);
- method @Deprecated public default void addRRect(androidx.compose.ui.geometry.RoundRect rrect);
method public void addRect(androidx.compose.ui.geometry.Rect rect);
method public void addRoundRect(androidx.compose.ui.geometry.RoundRect roundRect);
method public void arcTo(androidx.compose.ui.geometry.Rect rect, float startAngleDegrees, float sweepAngleDegrees, boolean forceMoveTo);
@@ -502,7 +497,6 @@
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
method public void setFillType(androidx.compose.ui.graphics.PathFillType p);
- method @Deprecated public default void shift-k-4lQ0M(long offset);
method public void translate-k-4lQ0M(long offset);
property public abstract androidx.compose.ui.graphics.PathFillType fillType;
property public abstract boolean isConvex;
@@ -941,7 +935,6 @@
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, float inset, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, optional float horizontal, optional float vertical, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotate-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float degrees, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
- method @Deprecated public static inline void rotateRad(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional float pivotX, optional float pivotY, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotateRad-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float scale, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-LCqtnZ0(androidx.compose.ui.graphics.drawscope.DrawScope, float scaleX, float scaleY, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
diff --git a/compose/ui/ui-graphics/api/restricted_current.txt b/compose/ui/ui-graphics/api/restricted_current.txt
index 4625be8..729264d 100644
--- a/compose/ui/ui-graphics/api/restricted_current.txt
+++ b/compose/ui/ui-graphics/api/restricted_current.txt
@@ -296,7 +296,6 @@
method public long getMagenta-0d7_KjU();
method public long getRed-0d7_KjU();
method public long getTransparent-0d7_KjU();
- method @Deprecated public long getUnset-0d7_KjU();
method public long getUnspecified-0d7_KjU();
method public long getWhite-0d7_KjU();
method public long getYellow-0d7_KjU();
@@ -310,7 +309,6 @@
property public final long Magenta;
property public final long Red;
property public final long Transparent;
- property @Deprecated public final long Unset;
property public final long Unspecified;
property public final long White;
property public final long Yellow;
@@ -337,9 +335,7 @@
method @androidx.compose.runtime.Stable public static long Color(long color);
method @androidx.compose.runtime.Stable public static long Color(@IntRange(from=0, to=255) int red, @IntRange(from=0, to=255) int green, @IntRange(from=0, to=255) int blue, optional @IntRange(from=0, to=255) int alpha);
method @androidx.compose.runtime.Stable public static long compositeOver-6xK2E-Q(long, long background);
- method @Deprecated public static inline boolean isSet-8_81llA(long);
method public static inline boolean isSpecified-8_81llA(long);
- method @Deprecated public static inline boolean isUnset-8_81llA(long);
method public static inline boolean isUnspecified-8_81llA(long);
method @androidx.compose.runtime.Stable public static long lerp-m18UwgE(long start, long stop, @FloatRange(from=0.0, to=1.0) float fraction);
method @androidx.compose.runtime.Stable public static float luminance-8_81llA(long);
@@ -513,7 +509,6 @@
method public void addArcRad(androidx.compose.ui.geometry.Rect oval, float startAngleRadians, float sweepAngleRadians);
method public void addOval(androidx.compose.ui.geometry.Rect oval);
method public void addPath-ej0GBII(androidx.compose.ui.graphics.Path path, optional long offset);
- method @Deprecated public default void addRRect(androidx.compose.ui.geometry.RoundRect rrect);
method public void addRect(androidx.compose.ui.geometry.Rect rect);
method public void addRoundRect(androidx.compose.ui.geometry.RoundRect roundRect);
method public void arcTo(androidx.compose.ui.geometry.Rect rect, float startAngleDegrees, float sweepAngleDegrees, boolean forceMoveTo);
@@ -534,7 +529,6 @@
method public void relativeQuadraticBezierTo(float dx1, float dy1, float dx2, float dy2);
method public void reset();
method public void setFillType(androidx.compose.ui.graphics.PathFillType p);
- method @Deprecated public default void shift-k-4lQ0M(long offset);
method public void translate-k-4lQ0M(long offset);
property public abstract androidx.compose.ui.graphics.PathFillType fillType;
property public abstract boolean isConvex;
@@ -997,7 +991,6 @@
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, float inset, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void inset(androidx.compose.ui.graphics.drawscope.DrawScope, optional float horizontal, optional float vertical, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotate-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float degrees, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
- method @Deprecated public static inline void rotateRad(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional float pivotX, optional float pivotY, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void rotateRad-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float radians, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-FvlOZkk(androidx.compose.ui.graphics.drawscope.DrawScope, float scale, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public static inline void scale-LCqtnZ0(androidx.compose.ui.graphics.drawscope.DrawScope, float scaleX, float scaleY, optional long pivot, kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Color.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Color.kt
index 42744fb..53249d4 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Color.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Color.kt
@@ -312,19 +312,6 @@
val Magenta = Color(0xFFFF00FF)
@Stable
val Transparent = Color(0x00000000)
- /**
- * Because Color is an inline class, this represents an unset value
- * without having to box the Color. It will be treated as [Transparent]
- * when drawn. A Color can compare with [Unspecified] for equality or use
- * [isUnspecified] to check for the unset value or [isSpecified] for any color that isn't
- * [Unspecified].
- */
- @Deprecated(
- "Use Color.Unspecified instead",
- ReplaceWith("Color.Unspecified", "androidx.compose.ui.graphics")
- )
- @Stable
- val Unset = Color(0f, 0f, 0f, 0f, ColorSpaces.Unspecified)
/**
* Because Color is an inline class, this represents an unset value
@@ -592,39 +579,19 @@
}
/**
- * `false` when this is [Color.Unset].
- */
-@Deprecated(
- "Use isSpecified instead",
- ReplaceWith("Color.isSpecified", "androidx.compose.ui.graphics")
-)
-@Stable
-inline val Color.isSet: Boolean get() = value != Color.Unspecified.value
-
-/**
* `false` when this is [Color.Unspecified].
*/
@Stable
inline val Color.isSpecified: Boolean get() = value != Color.Unspecified.value
/**
- * `true` when this is [Color.Unset].
- */
-@Deprecated(
- "Use Color.isUnspecified instead",
- ReplaceWith("Color.isUnspecified", "androidx.compose.ui.graphics")
-)
-@Stable
-inline val Color.isUnset: Boolean get() = value == Color.Unspecified.value
-
-/**
* `true` when this is [Color.Unspecified].
*/
@Stable
inline val Color.isUnspecified: Boolean get() = value == Color.Unspecified.value
/**
- * If this [Color] [isSet] then this is returned, otherwise [block] is executed and its result
+ * If this [Color] [isSpecified] then this is returned, otherwise [block] is executed and its result
* is returned.
*/
inline fun Color.useOrElse(block: () -> Color): Color = if (isSpecified) this else block()
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
index 36d29c6..355bc9b 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/Path.kt
@@ -199,15 +199,6 @@
fun addRoundRect(roundRect: RoundRect)
/**
- * Add a round rectangle shape to the path from the given [RoundRect]
- */
- @Deprecated(
- "Use addRoundRect(roundRect) instead",
- ReplaceWith("addRoundRect(rrect)", "androidx.compose.ui.graphics")
- )
- fun addRRect(rrect: RoundRect) = addRoundRect(rrect)
-
- /**
* Adds a new subpath that consists of the given `path` offset by the given
* `offset`.
*
@@ -233,15 +224,6 @@
/**
* Translates all the segments of every subpath by the given offset.
*/
- @Deprecated(
- "Use translate(offset) instead",
- ReplaceWith("translate(offset)", "androidx.compose.ui.graphics.Path")
- )
- fun shift(offset: Offset) = translate(offset)
-
- /**
- * Translates all the segments of every subpath by the given offset.
- */
fun translate(offset: Offset)
/**
diff --git a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.kt b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.kt
index d4df37f..f04d876 100644
--- a/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.kt
+++ b/compose/ui/ui-graphics/src/commonMain/kotlin/androidx/compose/ui/graphics/drawscope/DrawScope.kt
@@ -156,34 +156,6 @@
}
/**
- * Add a rotation (in radians clockwise) to the current transform at the given pivot point.
- * The pivot coordinate remains unchanged by the rotation transformation
- *
- * @param radians to rotate clockwise
- * @param pivotX The x-coordinate for the pivot point, defaults to the center of the
- * coordinate space horizontally
- * @param pivotY The y-coordinate for the pivot point, defaults to the center of the
- * coordinate space vertically
- * @param block lambda that is called to issue drawing commands within the rotated
- * coordinate space
- */
-@Deprecated(
- "Use rotateRad(radians, Offset(pivotX, pivotY)) instead",
- ReplaceWith(
- "rotateRad(radians, Offset(pivotX, pivotY), block)",
- "androidx.compose.ui.graphics.drawscope"
- )
-)
-inline fun DrawScope.rotateRad(
- radians: Float,
- pivotX: Float = center.x,
- pivotY: Float = center.y,
- block: DrawScope.() -> Unit
-) {
- withTransform({ rotate(degrees(radians), Offset(pivotX, pivotY)) }, block)
-}
-
-/**
* Add an axis-aligned scale to the current transform, scaling by the first
* argument in the horizontal direction and the second in the vertical
* direction at the given pivot coordinate. The pivot coordinate remains
diff --git a/compose/ui/ui-unit/api/current.txt b/compose/ui/ui-unit/api/current.txt
index c322515..2fb14b0 100644
--- a/compose/ui/ui-unit/api/current.txt
+++ b/compose/ui/ui-unit/api/current.txt
@@ -312,9 +312,7 @@
}
public static final class IntOffset.Companion {
- method @Deprecated public long getOrigin-nOcc-ac();
method public long getZero-nOcc-ac();
- property @Deprecated public final long Origin;
property public final long Zero;
}
@@ -379,27 +377,6 @@
public static final class Position.Companion {
}
- @Deprecated @androidx.compose.runtime.Immutable public final class PxBounds {
- ctor @Deprecated public PxBounds(float left, float top, float right, float bottom);
- method @Deprecated public float component1();
- method @Deprecated public float component2();
- method @Deprecated public float component3();
- method @Deprecated public float component4();
- method @Deprecated @androidx.compose.runtime.Immutable public androidx.compose.ui.unit.PxBounds copy(float left, float top, float right, float bottom);
- method @Deprecated public float getBottom();
- method @Deprecated public float getLeft();
- method @Deprecated public float getRight();
- method @Deprecated public float getTop();
- property public final float bottom;
- property public final float left;
- property public final float right;
- property public final float top;
- field @Deprecated public static final androidx.compose.ui.unit.PxBounds.Companion Companion;
- }
-
- @Deprecated public static final class PxBounds.Companion {
- }
-
@androidx.compose.runtime.Immutable public final inline class PxCubed implements java.lang.Comparable<androidx.compose.ui.unit.PxCubed> {
ctor public PxCubed();
method @androidx.compose.runtime.Stable public operator int compareTo-830ceAw(float p);
@@ -437,15 +414,8 @@
}
public final class PxKt {
- method @Deprecated @androidx.compose.runtime.Stable public static inline androidx.compose.ui.unit.PxBounds PxBounds-MrV732k(long topLeft, long size);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long center(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static long center-uvyYCjk(long);
- method @Deprecated public static inline float getHeight(androidx.compose.ui.unit.PxBounds);
- method @Deprecated public static inline float getWidth(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static inline long round-k-4lQ0M(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.unit.PxBounds toBounds-uvyYCjk(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.geometry.Rect toRect(androidx.compose.ui.unit.PxBounds);
- method @Deprecated @androidx.compose.runtime.Stable public static long toSize(androidx.compose.ui.unit.PxBounds);
}
@androidx.compose.runtime.Immutable public final inline class PxSquared implements java.lang.Comparable<androidx.compose.ui.unit.PxSquared> {
diff --git a/compose/ui/ui-unit/api/public_plus_experimental_current.txt b/compose/ui/ui-unit/api/public_plus_experimental_current.txt
index c322515..2fb14b0 100644
--- a/compose/ui/ui-unit/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui-unit/api/public_plus_experimental_current.txt
@@ -312,9 +312,7 @@
}
public static final class IntOffset.Companion {
- method @Deprecated public long getOrigin-nOcc-ac();
method public long getZero-nOcc-ac();
- property @Deprecated public final long Origin;
property public final long Zero;
}
@@ -379,27 +377,6 @@
public static final class Position.Companion {
}
- @Deprecated @androidx.compose.runtime.Immutable public final class PxBounds {
- ctor @Deprecated public PxBounds(float left, float top, float right, float bottom);
- method @Deprecated public float component1();
- method @Deprecated public float component2();
- method @Deprecated public float component3();
- method @Deprecated public float component4();
- method @Deprecated @androidx.compose.runtime.Immutable public androidx.compose.ui.unit.PxBounds copy(float left, float top, float right, float bottom);
- method @Deprecated public float getBottom();
- method @Deprecated public float getLeft();
- method @Deprecated public float getRight();
- method @Deprecated public float getTop();
- property public final float bottom;
- property public final float left;
- property public final float right;
- property public final float top;
- field @Deprecated public static final androidx.compose.ui.unit.PxBounds.Companion Companion;
- }
-
- @Deprecated public static final class PxBounds.Companion {
- }
-
@androidx.compose.runtime.Immutable public final inline class PxCubed implements java.lang.Comparable<androidx.compose.ui.unit.PxCubed> {
ctor public PxCubed();
method @androidx.compose.runtime.Stable public operator int compareTo-830ceAw(float p);
@@ -437,15 +414,8 @@
}
public final class PxKt {
- method @Deprecated @androidx.compose.runtime.Stable public static inline androidx.compose.ui.unit.PxBounds PxBounds-MrV732k(long topLeft, long size);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long center(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static long center-uvyYCjk(long);
- method @Deprecated public static inline float getHeight(androidx.compose.ui.unit.PxBounds);
- method @Deprecated public static inline float getWidth(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static inline long round-k-4lQ0M(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.unit.PxBounds toBounds-uvyYCjk(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.geometry.Rect toRect(androidx.compose.ui.unit.PxBounds);
- method @Deprecated @androidx.compose.runtime.Stable public static long toSize(androidx.compose.ui.unit.PxBounds);
}
@androidx.compose.runtime.Immutable public final inline class PxSquared implements java.lang.Comparable<androidx.compose.ui.unit.PxSquared> {
diff --git a/compose/ui/ui-unit/api/restricted_current.txt b/compose/ui/ui-unit/api/restricted_current.txt
index 9de1971..62b6c2a 100644
--- a/compose/ui/ui-unit/api/restricted_current.txt
+++ b/compose/ui/ui-unit/api/restricted_current.txt
@@ -312,9 +312,7 @@
}
public static final class IntOffset.Companion {
- method @Deprecated public long getOrigin-nOcc-ac();
method public long getZero-nOcc-ac();
- property @Deprecated public final long Origin;
property public final long Zero;
}
@@ -379,27 +377,6 @@
public static final class Position.Companion {
}
- @Deprecated @androidx.compose.runtime.Immutable public final class PxBounds {
- ctor @Deprecated public PxBounds(float left, float top, float right, float bottom);
- method @Deprecated public float component1();
- method @Deprecated public float component2();
- method @Deprecated public float component3();
- method @Deprecated public float component4();
- method @Deprecated @androidx.compose.runtime.Immutable public androidx.compose.ui.unit.PxBounds copy(float left, float top, float right, float bottom);
- method @Deprecated public float getBottom();
- method @Deprecated public float getLeft();
- method @Deprecated public float getRight();
- method @Deprecated public float getTop();
- property public final float bottom;
- property public final float left;
- property public final float right;
- property public final float top;
- field @Deprecated public static final androidx.compose.ui.unit.PxBounds.Companion Companion;
- }
-
- @Deprecated public static final class PxBounds.Companion {
- }
-
@androidx.compose.runtime.Immutable public final inline class PxCubed implements java.lang.Comparable<androidx.compose.ui.unit.PxCubed> {
ctor public PxCubed();
method @androidx.compose.runtime.Stable public operator int compareTo-830ceAw(float p);
@@ -437,15 +414,8 @@
}
public final class PxKt {
- method @Deprecated @androidx.compose.runtime.Stable public static inline androidx.compose.ui.unit.PxBounds PxBounds-MrV732k(long topLeft, long size);
- method @Deprecated @androidx.compose.runtime.Stable public static inline long center(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static long center-uvyYCjk(long);
- method @Deprecated public static inline float getHeight(androidx.compose.ui.unit.PxBounds);
- method @Deprecated public static inline float getWidth(androidx.compose.ui.unit.PxBounds);
method @androidx.compose.runtime.Stable public static inline long round-k-4lQ0M(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.unit.PxBounds toBounds-uvyYCjk(long);
- method @Deprecated @androidx.compose.runtime.Stable public static androidx.compose.ui.geometry.Rect toRect(androidx.compose.ui.unit.PxBounds);
- method @Deprecated @androidx.compose.runtime.Stable public static long toSize(androidx.compose.ui.unit.PxBounds);
}
@androidx.compose.runtime.Immutable public final inline class PxSquared implements java.lang.Comparable<androidx.compose.ui.unit.PxSquared> {
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/IntOffset.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/IntOffset.kt
index ebfef90..149def4 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/IntOffset.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/IntOffset.kt
@@ -121,15 +121,6 @@
companion object {
val Zero = IntOffset(0, 0)
-
- @Deprecated(
- "Use IntOffset.Zero instead",
- ReplaceWith(
- "Zero",
- "androidx.compose.ui.unit.IntOffset"
- )
- )
- val Origin = Zero
}
}
diff --git a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Px.kt b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Px.kt
index 9235aac..c961d14 100644
--- a/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Px.kt
+++ b/compose/ui/ui-unit/src/commonMain/kotlin/androidx/compose/ui/unit/Px.kt
@@ -20,7 +20,6 @@
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.ui.geometry.Offset
-import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.geometry.Size
import kotlin.math.roundToInt
@@ -220,133 +219,4 @@
* Round a [Offset] down to the nearest [Int] coordinates.
*/
@Stable
-inline fun Offset.round(): IntOffset = IntOffset(x.roundToInt(), y.roundToInt())
-
-/**
- * A four dimensional bounds using pixels for units
- */
-@Deprecated(
- "Use Rect instead",
- ReplaceWith(
- "Rect(left, top, right, bottom)",
- "androidx.compose.ui.geometry"
- )
-)
-@Immutable
-data class PxBounds(
- val left: Float,
- val top: Float,
- val right: Float,
- val bottom: Float
-) {
- companion object
-}
-
-@Deprecated(
- "Use Rect instead",
- ReplaceWith("Rect(topleft, size)", "androidx.compose.ui.geometry")
-)
-@Suppress("DEPRECATION")
-@Stable
-inline fun PxBounds(topLeft: Offset, size: Size) =
- PxBounds(
- left = topLeft.x,
- top = topLeft.y,
- right = topLeft.x + size.width,
- bottom = topLeft.y + size.height
- )
-
-/**
- * A width of this PxBounds in pixels.
- */
-@Deprecated(
- "Use Rect.width instead",
- ReplaceWith(
- "Rect.width",
- "androidx.compose.ui.geometry"
- )
-)
-@Suppress("DEPRECATION")
-@Stable
-inline val PxBounds.width: Float get() = right - left
-
-/**
- * A height of this PxBounds in pixels.
- */
-@Deprecated(
- "use Rect.height instead",
- ReplaceWith(
- "Rect.height",
- "androidx.compose.ui.geometry"
- )
-)
-@Suppress("DEPRECATION")
-@Stable
-inline val PxBounds.height: Float get() = bottom - top
-
-/**
- * Returns the [Offset] of the center of the [PxBounds].
- */
-@Deprecated(
- "Use Rect.center instead",
- ReplaceWith(
- "Rect.center",
- "androidx.compose.ui.geometry"
- )
-)
-@Suppress("DEPRECATION")
-@Stable
-inline fun PxBounds.center(): Offset {
- return Offset((left + right) / 2f, (top + bottom) / 2f)
-}
-
-/**
- * Convert a [PxBounds] to a [Size].
- */
-@Deprecated(
- "Use Rect.size instead",
- ReplaceWith(
- "Rect.size",
- "androidx.compose.ui.geometry"
- )
-)
-@Suppress("DEPRECATION")
-@Stable
-fun PxBounds.toSize(): Size {
- return Size(width, height)
-}
-
-/**
- * Convert a [Size] to a [PxBounds]. The left and top are 0.px and the right and bottom
- * are the width and height, respectively.
- */
-@Deprecated(
- "Use toRect() instead",
- ReplaceWith("Size.toRect()", "androidx.compose.ui.geometry")
-)
-@Suppress("DEPRECATION")
-@Stable
-fun Size.toBounds(): PxBounds {
- return PxBounds(0f, 0f, width, height)
-}
-
-/**
- * Convert a [PxBounds] to a [Rect].
- */
-@Deprecated(
- "Use Rect instead of PxBounds",
- ReplaceWith(
- "Rect(left, top, right, bottom)",
- "androidx.compose.ui.geometry"
- )
-)
-@Suppress("DEPRECATION")
-@Stable
-fun PxBounds.toRect(): Rect {
- return Rect(
- left,
- top,
- right,
- bottom
- )
-}
\ No newline at end of file
+inline fun Offset.round(): IntOffset = IntOffset(x.roundToInt(), y.roundToInt())
\ No newline at end of file
diff --git a/compose/ui/ui-unit/src/test/kotlin/androidx/compose/ui/unit/PxTest.kt b/compose/ui/ui-unit/src/test/kotlin/androidx/compose/ui/unit/PxTest.kt
index 205376a3..3be85e4 100644
--- a/compose/ui/ui-unit/src/test/kotlin/androidx/compose/ui/unit/PxTest.kt
+++ b/compose/ui/ui-unit/src/test/kotlin/androidx/compose/ui/unit/PxTest.kt
@@ -17,9 +17,7 @@
package androidx.compose.ui.unit
import androidx.compose.ui.geometry.Offset
-import androidx.compose.ui.geometry.Size
import androidx.compose.ui.geometry.lerp
-import org.junit.Assert
import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
@@ -97,34 +95,4 @@
val b = IntOffset(5, 8)
assertEquals(Offset(8f, 18f), a + b)
}
-
- @Test
- @Suppress("DEPRECATION")
- fun boundsWidth() {
- val bounds = PxBounds(10f, 5f, 25f, 15f)
- assertEquals(15f, bounds.width)
- }
-
- @Test
- @Suppress("DEPRECATION")
- fun boundsHeight() {
- val bounds = PxBounds(10f, 5f, 25f, 15f)
- assertEquals(10f, bounds.height)
- }
-
- @Test
- @Suppress("DEPRECATION")
- fun toBounds() {
- val size = Size(15f, 10f)
- val bounds = PxBounds(0f, 0f, 15f, 10f)
- assertEquals(bounds, size.toBounds())
- }
-
- @Test
- @Suppress("DEPRECATION")
- fun toSize() {
- val size = Size(15f, 10f)
- val bounds = PxBounds(10f, 5f, 25f, 15f)
- Assert.assertEquals(size, bounds.toSize())
- }
}
\ No newline at end of file
diff --git a/compose/ui/ui/api/current.txt b/compose/ui/ui/api/current.txt
index 5779a75..9451fc3 100644
--- a/compose/ui/ui/api/current.txt
+++ b/compose/ui/ui/api/current.txt
@@ -106,7 +106,6 @@
method public float getDensity();
method public float getFontScale();
method public long getSize-NH-jbRc();
- method @Deprecated public androidx.compose.ui.DrawResult onDraw(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawBehind(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawWithContent(kotlin.jvm.functions.Function1<? super androidx.compose.ui.ContentDrawScope,kotlin.Unit> block);
property public float density;
@@ -210,7 +209,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public default operator androidx.compose.ui.Modifier plus(androidx.compose.ui.Modifier other);
method public default infix androidx.compose.ui.Modifier then(androidx.compose.ui.Modifier other);
field public static final androidx.compose.ui.Modifier.Companion Companion;
}
@@ -220,8 +218,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public androidx.compose.ui.Modifier getNone();
- property @Deprecated public final androidx.compose.ui.Modifier None;
}
public static interface Modifier.Element extends androidx.compose.ui.Modifier {
@@ -1751,12 +1747,6 @@
public final class OnGloballyPositionedModifierKt {
method public static inline androidx.compose.ui.Modifier onGloballyPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onGloballyPositioned);
- method @Deprecated public static androidx.compose.ui.Modifier onPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onPositioned);
- }
-
- @Deprecated public interface OnPositionedModifier extends androidx.compose.ui.layout.OnGloballyPositionedModifier {
- method @Deprecated public default void onGloballyPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
- method @Deprecated public void onPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
}
public interface OnRemeasuredModifier extends androidx.compose.ui.Modifier.Element {
diff --git a/compose/ui/ui/api/public_plus_experimental_current.txt b/compose/ui/ui/api/public_plus_experimental_current.txt
index 5779a75..9451fc3 100644
--- a/compose/ui/ui/api/public_plus_experimental_current.txt
+++ b/compose/ui/ui/api/public_plus_experimental_current.txt
@@ -106,7 +106,6 @@
method public float getDensity();
method public float getFontScale();
method public long getSize-NH-jbRc();
- method @Deprecated public androidx.compose.ui.DrawResult onDraw(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawBehind(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawWithContent(kotlin.jvm.functions.Function1<? super androidx.compose.ui.ContentDrawScope,kotlin.Unit> block);
property public float density;
@@ -210,7 +209,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public default operator androidx.compose.ui.Modifier plus(androidx.compose.ui.Modifier other);
method public default infix androidx.compose.ui.Modifier then(androidx.compose.ui.Modifier other);
field public static final androidx.compose.ui.Modifier.Companion Companion;
}
@@ -220,8 +218,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public androidx.compose.ui.Modifier getNone();
- property @Deprecated public final androidx.compose.ui.Modifier None;
}
public static interface Modifier.Element extends androidx.compose.ui.Modifier {
@@ -1751,12 +1747,6 @@
public final class OnGloballyPositionedModifierKt {
method public static inline androidx.compose.ui.Modifier onGloballyPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onGloballyPositioned);
- method @Deprecated public static androidx.compose.ui.Modifier onPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onPositioned);
- }
-
- @Deprecated public interface OnPositionedModifier extends androidx.compose.ui.layout.OnGloballyPositionedModifier {
- method @Deprecated public default void onGloballyPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
- method @Deprecated public void onPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
}
public interface OnRemeasuredModifier extends androidx.compose.ui.Modifier.Element {
diff --git a/compose/ui/ui/api/restricted_current.txt b/compose/ui/ui/api/restricted_current.txt
index 1cf3e36..f8809e6 100644
--- a/compose/ui/ui/api/restricted_current.txt
+++ b/compose/ui/ui/api/restricted_current.txt
@@ -106,7 +106,6 @@
method public float getDensity();
method public float getFontScale();
method public long getSize-NH-jbRc();
- method @Deprecated public androidx.compose.ui.DrawResult onDraw(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawBehind(kotlin.jvm.functions.Function1<? super androidx.compose.ui.graphics.drawscope.DrawScope,kotlin.Unit> block);
method public androidx.compose.ui.DrawResult onDrawWithContent(kotlin.jvm.functions.Function1<? super androidx.compose.ui.ContentDrawScope,kotlin.Unit> block);
property public float density;
@@ -210,7 +209,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public default operator androidx.compose.ui.Modifier plus(androidx.compose.ui.Modifier other);
method public default infix androidx.compose.ui.Modifier then(androidx.compose.ui.Modifier other);
field public static final androidx.compose.ui.Modifier.Companion Companion;
}
@@ -220,8 +218,6 @@
method public boolean any(kotlin.jvm.functions.Function1<? super androidx.compose.ui.Modifier.Element,java.lang.Boolean> predicate);
method public <R> R! foldIn(R? initial, kotlin.jvm.functions.Function2<? super R,? super androidx.compose.ui.Modifier.Element,? extends R> operation);
method public <R> R! foldOut(R? initial, kotlin.jvm.functions.Function2<? super androidx.compose.ui.Modifier.Element,? super R,? extends R> operation);
- method @Deprecated public androidx.compose.ui.Modifier getNone();
- property @Deprecated public final androidx.compose.ui.Modifier None;
}
public static interface Modifier.Element extends androidx.compose.ui.Modifier {
@@ -1798,12 +1794,6 @@
public final class OnGloballyPositionedModifierKt {
method public static inline androidx.compose.ui.Modifier onGloballyPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onGloballyPositioned);
- method @Deprecated public static androidx.compose.ui.Modifier onPositioned(androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1<? super androidx.compose.ui.layout.LayoutCoordinates,kotlin.Unit> onPositioned);
- }
-
- @Deprecated public interface OnPositionedModifier extends androidx.compose.ui.layout.OnGloballyPositionedModifier {
- method @Deprecated public default void onGloballyPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
- method @Deprecated public void onPositioned(androidx.compose.ui.layout.LayoutCoordinates coordinates);
}
public interface OnRemeasuredModifier extends androidx.compose.ui.Modifier.Element {
diff --git a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
index 054014a..e3e2fb1 100644
--- a/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
+++ b/compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
@@ -3471,7 +3471,7 @@
}
@Composable
-fun Align(modifier: Modifier = Modifier.None, children: @Composable () -> Unit) {
+fun Align(modifier: Modifier = Modifier, children: @Composable () -> Unit) {
Layout(
modifier = modifier,
measureBlock = { measurables, constraints ->
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawModifier.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawModifier.kt
index 3ae3b46..63ec2c6 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawModifier.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawModifier.kt
@@ -133,18 +133,6 @@
}
/**
- * Issue drawing commands to be executed before the layout content is drawn
- */
- @Deprecated(
- "Use onDrawBehind instead",
- ReplaceWith("onDrawBehind(block)", "androidx.compose.ui")
- )
- fun onDraw(block: DrawScope.() -> Unit): DrawResult = onDrawWithContent {
- block()
- drawContent()
- }
-
- /**
* Issue drawing commands before or after the layout's drawing contents
*/
fun onDrawWithContent(block: ContentDrawScope.() -> Unit): DrawResult {
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Modifier.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Modifier.kt
index e1902a3..5e34e58 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Modifier.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/Modifier.kt
@@ -95,17 +95,6 @@
*
* Returns a [Modifier] representing this modifier followed by [other] in sequence.
*/
- @Deprecated(
- "Use \"then\" instead.",
- replaceWith = ReplaceWith("this.then(other)")
- )
- operator fun plus(other: Modifier): Modifier = then(other)
-
- /**
- * Concatenates this modifier with another.
- *
- * Returns a [Modifier] representing this modifier followed by [other] in sequence.
- */
infix fun then(other: Modifier): Modifier =
if (other === Modifier) this else CombinedModifier(this, other)
@@ -142,29 +131,8 @@
override fun <R> foldOut(initial: R, operation: (Element, R) -> R): R = initial
override fun any(predicate: (Element) -> Boolean): Boolean = false
override fun all(predicate: (Element) -> Boolean): Boolean = true
- @Deprecated(
- "Use \"then\" instead.",
- replaceWith = ReplaceWith("this.then(other)")
- )
- override operator fun plus(other: Modifier): Modifier = then(other)
override infix fun then(other: Modifier): Modifier = other
override fun toString() = "Modifier"
-
- /**
- * An empty [Modifier] that contains no [elements][Element].
- * Suitable for use as a sentinel or default parameter.
- *
- * @deprecated Use the [Modifier] companion object instead
- */
- @Deprecated(
- "use the Modifier companion object instead",
- replaceWith = ReplaceWith(
- "Modifier",
- "androidx.compose.ui.Modifier"
- )
- )
- val None: Modifier
- get() = this
}
}
diff --git a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/OnGloballyPositionedModifier.kt b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/OnGloballyPositionedModifier.kt
index 5fd1e9b..cfc76d3 100644
--- a/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/OnGloballyPositionedModifier.kt
+++ b/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/OnGloballyPositionedModifier.kt
@@ -34,29 +34,6 @@
}
})
-@Deprecated(
- "Use onGloballyPositioned() instead",
- replaceWith = ReplaceWith("this.onGloballyPositioned(onPositioned)")
-)
-fun Modifier.onPositioned(
- onPositioned: (LayoutCoordinates) -> Unit
-) = onGloballyPositioned(onPositioned)
-
-@Deprecated(
- "Use OnGloballyPositionedModifier instead",
- replaceWith = ReplaceWith("onGlobalPositionChangedModifier")
-)
-interface OnPositionedModifier : OnGloballyPositionedModifier {
- override fun onGloballyPositioned(coordinates: LayoutCoordinates) = onPositioned(coordinates)
- /**
- * Called with the final LayoutCoordinates of the Layout after measuring.
- * Note that it will be called after a composition when the coordinates are finalized.
- * The position in the modifier chain makes no difference in either
- * the [LayoutCoordinates] argument or when the [onPositioned] is called.
- */
- fun onPositioned(coordinates: LayoutCoordinates)
-}
-
/**
* A modifier whose [onGloballyPositioned] is called with the final LayoutCoordinates of the
* Layout when the global position of the content may have changed.