mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-03 03:00:23 +01:00
90 lines
3 KiB
Java
90 lines
3 KiB
Java
package com.caverock.androidsvg;
|
|
|
|
import rx.Single$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes6.dex */
|
|
public class PreserveAspectRatio {
|
|
public static final PreserveAspectRatio BOTTOM;
|
|
public static final PreserveAspectRatio END;
|
|
public static final PreserveAspectRatio FULLSCREEN;
|
|
public static final PreserveAspectRatio FULLSCREEN_START;
|
|
public static final PreserveAspectRatio LETTERBOX;
|
|
public static final PreserveAspectRatio START;
|
|
public static final PreserveAspectRatio TOP;
|
|
private Alignment alignment;
|
|
private Scale scale;
|
|
public static final PreserveAspectRatio UNSCALED = new PreserveAspectRatio(null, null);
|
|
public static final PreserveAspectRatio STRETCH = new PreserveAspectRatio(Alignment.none, null);
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public enum Alignment {
|
|
none,
|
|
xMinYMin,
|
|
xMidYMin,
|
|
xMaxYMin,
|
|
xMinYMid,
|
|
xMidYMid,
|
|
xMaxYMid,
|
|
xMinYMax,
|
|
xMidYMax,
|
|
xMaxYMax
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
public enum Scale {
|
|
meet,
|
|
slice
|
|
}
|
|
|
|
static {
|
|
Alignment alignment = Alignment.xMidYMid;
|
|
Scale scale = Scale.meet;
|
|
LETTERBOX = new PreserveAspectRatio(alignment, scale);
|
|
Alignment alignment2 = Alignment.xMinYMin;
|
|
START = new PreserveAspectRatio(alignment2, scale);
|
|
END = new PreserveAspectRatio(Alignment.xMaxYMax, scale);
|
|
TOP = new PreserveAspectRatio(Alignment.xMidYMin, scale);
|
|
BOTTOM = new PreserveAspectRatio(Alignment.xMidYMax, scale);
|
|
Scale scale2 = Scale.slice;
|
|
FULLSCREEN = new PreserveAspectRatio(alignment, scale2);
|
|
FULLSCREEN_START = new PreserveAspectRatio(alignment2, scale2);
|
|
}
|
|
|
|
public PreserveAspectRatio(Alignment alignment, Scale scale) {
|
|
this.alignment = alignment;
|
|
this.scale = scale;
|
|
}
|
|
|
|
public static PreserveAspectRatio of(String str) {
|
|
try {
|
|
return SVGParser.parsePreserveAspectRatio(str);
|
|
} catch (SVGParseException e) {
|
|
Single$$ExternalSyntheticBUOutline0.m$3(e.getMessage());
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj == null || getClass() != obj.getClass()) {
|
|
return false;
|
|
}
|
|
PreserveAspectRatio preserveAspectRatio = (PreserveAspectRatio) obj;
|
|
return this.alignment == preserveAspectRatio.alignment && this.scale == preserveAspectRatio.scale;
|
|
}
|
|
|
|
public Alignment getAlignment() {
|
|
return this.alignment;
|
|
}
|
|
|
|
public Scale getScale() {
|
|
return this.scale;
|
|
}
|
|
|
|
public String toString() {
|
|
return this.alignment + " " + this.scale;
|
|
}
|
|
}
|