mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-17 11:27:17 +01:00
68 lines
4 KiB
Java
68 lines
4 KiB
Java
package androidx.compose.ui.unit;
|
|
|
|
import androidx.compose.runtime.Immutable;
|
|
import androidx.compose.runtime.Stable;
|
|
import androidx.compose.ui.unit.fontscaling.FontScaleConverter;
|
|
import androidx.compose.ui.unit.fontscaling.FontScaleConverterFactory;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Immutable
|
|
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\bg\u0018\u00002\u00020\u0001J\u0013\u0010\b\u001a\u00020\t*\u00020\nH\u0017¢\u0006\u0004\b\u000b\u0010\fJ\u0013\u0010\r\u001a\u00020\n*\u00020\tH\u0017¢\u0006\u0004\b\u000e\u0010\u000fR\u001a\u0010\u0002\u001a\u00020\u00038&X§\u0004¢\u0006\f\u0012\u0004\b\u0004\u0010\u0005\u001a\u0004\b\u0006\u0010\u0007ø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\u0010À\u0006\u0003"}, d2 = {"Landroidx/compose/ui/unit/FontScaling;", "", "fontScale", "", "getFontScale$annotations", "()V", "getFontScale", "()F", "toSp", "Landroidx/compose/ui/unit/TextUnit;", "Landroidx/compose/ui/unit/Dp;", "toSp-0xMU5do", "(F)J", "toDp", "toDp-GaN1DYA", "(J)F", "ui-unit"}, k = 1, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nFontScaling.android.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FontScaling.android.kt\nandroidx/compose/ui/unit/FontScaling\n+ 2 InlineClassHelper.kt\nandroidx/compose/ui/unit/InlineClassHelperKt\n*L\n1#1,64:1\n53#2,4:65\n*S KotlinDebug\n*F\n+ 1 FontScaling.android.kt\nandroidx/compose/ui/unit/FontScaling\n*L\n55#1:65,4\n*E\n"})
|
|
/* loaded from: classes13.dex */
|
|
public interface FontScaling {
|
|
float getFontScale();
|
|
|
|
@Stable
|
|
/* renamed from: toDp-GaN1DYA */
|
|
default float mo552toDpGaN1DYA(long j) {
|
|
if (!TextUnitType.m7590equalsimpl0(TextUnit.m7561getTypeUIouoOA(j), TextUnitType.INSTANCE.m7595getSpUIouoOA())) {
|
|
InlineClassHelperKt.throwIllegalStateException("Only Sp can convert to Px");
|
|
}
|
|
FontScaleConverterFactory fontScaleConverterFactory = FontScaleConverterFactory.INSTANCE;
|
|
if (!fontScaleConverterFactory.isNonLinearFontScalingActive(getFontScale())) {
|
|
return Dp.m7368constructorimpl(getFontScale() * TextUnit.m7562getValueimpl(j));
|
|
}
|
|
FontScaleConverter forScale = fontScaleConverterFactory.forScale(getFontScale());
|
|
if (forScale != null) {
|
|
return Dp.m7368constructorimpl(forScale.convertSpToDp(TextUnit.m7562getValueimpl(j)));
|
|
}
|
|
return Dp.m7368constructorimpl(getFontScale() * TextUnit.m7562getValueimpl(j));
|
|
}
|
|
|
|
@Stable
|
|
/* renamed from: toSp-0xMU5do */
|
|
default long mo559toSp0xMU5do(float f) {
|
|
FontScaleConverterFactory fontScaleConverterFactory = FontScaleConverterFactory.INSTANCE;
|
|
if (!fontScaleConverterFactory.isNonLinearFontScalingActive(getFontScale())) {
|
|
return TextUnitKt.getSp(f / getFontScale());
|
|
}
|
|
FontScaleConverter forScale = fontScaleConverterFactory.forScale(getFontScale());
|
|
return TextUnitKt.getSp(forScale != null ? forScale.convertDpToSp(f) : f / getFontScale());
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
|
|
public static final class DefaultImpls {
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toDp-GaN1DYA, reason: not valid java name */
|
|
public static float m7479toDpGaN1DYA(@NotNull FontScaling fontScaling, long j) {
|
|
return FontScaling.super.mo552toDpGaN1DYA(j);
|
|
}
|
|
|
|
@Stable
|
|
@Deprecated
|
|
/* renamed from: toSp-0xMU5do, reason: not valid java name */
|
|
public static long m7480toSp0xMU5do(@NotNull FontScaling fontScaling, float f) {
|
|
return FontScaling.super.mo559toSp0xMU5do(f);
|
|
}
|
|
|
|
@Stable
|
|
public static /* synthetic */ void getFontScale$annotations() {
|
|
}
|
|
}
|
|
}
|