what-the-bank/sources/com/google/android/gms/maps/model/GroundOverlayOptions.java

195 lines
6.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.maps.model;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.dynamic.IObjectWrapper;
/* loaded from: classes2.dex */
public final class GroundOverlayOptions extends AbstractSafeParcelable {
public static final Parcelable.Creator<GroundOverlayOptions> CREATOR = new zzd();
public static final float NO_DIMENSION = -1.0f;
private float bearing;
private float height;
private float width;
private float zzcs;
private boolean zzct;
private boolean zzcu;
private BitmapDescriptor zzcx;
private LatLng zzcy;
private LatLngBounds zzcz;
private float zzda;
private float zzdb;
private float zzdc;
/* JADX INFO: Access modifiers changed from: package-private */
public GroundOverlayOptions(IBinder iBinder, LatLng latLng, float f, float f2, LatLngBounds latLngBounds, float f3, float f4, boolean z, float f5, float f6, float f7, boolean z2) {
this.zzct = true;
this.zzda = BitmapDescriptorFactory.HUE_RED;
this.zzdb = 0.5f;
this.zzdc = 0.5f;
this.zzcu = false;
this.zzcx = new BitmapDescriptor(IObjectWrapper.Stub.asInterface(iBinder));
this.zzcy = latLng;
this.width = f;
this.height = f2;
this.zzcz = latLngBounds;
this.bearing = f3;
this.zzcs = f4;
this.zzct = z;
this.zzda = f5;
this.zzdb = f6;
this.zzdc = f7;
this.zzcu = z2;
}
public GroundOverlayOptions() {
this.zzct = true;
this.zzda = BitmapDescriptorFactory.HUE_RED;
this.zzdb = 0.5f;
this.zzdc = 0.5f;
this.zzcu = false;
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
int beginObjectHeader = SafeParcelWriter.beginObjectHeader(parcel);
SafeParcelWriter.writeIBinder(parcel, 2, this.zzcx.zzb().asBinder(), false);
SafeParcelWriter.writeParcelable(parcel, 3, getLocation(), i, false);
SafeParcelWriter.writeFloat(parcel, 4, getWidth());
SafeParcelWriter.writeFloat(parcel, 5, getHeight());
SafeParcelWriter.writeParcelable(parcel, 6, getBounds(), i, false);
SafeParcelWriter.writeFloat(parcel, 7, getBearing());
SafeParcelWriter.writeFloat(parcel, 8, getZIndex());
SafeParcelWriter.writeBoolean(parcel, 9, isVisible());
SafeParcelWriter.writeFloat(parcel, 10, getTransparency());
SafeParcelWriter.writeFloat(parcel, 11, getAnchorU());
SafeParcelWriter.writeFloat(parcel, 12, getAnchorV());
SafeParcelWriter.writeBoolean(parcel, 13, isClickable());
SafeParcelWriter.finishObjectHeader(parcel, beginObjectHeader);
}
public final GroundOverlayOptions image(BitmapDescriptor bitmapDescriptor) {
Preconditions.checkNotNull(bitmapDescriptor, "imageDescriptor must not be null");
this.zzcx = bitmapDescriptor;
return this;
}
public final GroundOverlayOptions position(LatLng latLng, float f) {
Preconditions.checkState(this.zzcz == null, "Position has already been set using positionFromBounds");
Preconditions.checkArgument(latLng != null, "Location must be specified");
Preconditions.checkArgument(f >= BitmapDescriptorFactory.HUE_RED, "Width must be non-negative");
return zza(latLng, f, -1.0f);
}
public final GroundOverlayOptions position(LatLng latLng, float f, float f2) {
Preconditions.checkState(this.zzcz == null, "Position has already been set using positionFromBounds");
Preconditions.checkArgument(latLng != null, "Location must be specified");
Preconditions.checkArgument(f >= BitmapDescriptorFactory.HUE_RED, "Width must be non-negative");
Preconditions.checkArgument(f2 >= BitmapDescriptorFactory.HUE_RED, "Height must be non-negative");
return zza(latLng, f, f2);
}
public final GroundOverlayOptions positionFromBounds(LatLngBounds latLngBounds) {
LatLng latLng = this.zzcy;
boolean z = latLng == null;
String valueOf = String.valueOf(latLng);
StringBuilder sb = new StringBuilder(String.valueOf(valueOf).length() + 46);
sb.append("Position has already been set using position: ");
sb.append(valueOf);
Preconditions.checkState(z, sb.toString());
this.zzcz = latLngBounds;
return this;
}
public final GroundOverlayOptions transparency(float f) {
Preconditions.checkArgument(f >= BitmapDescriptorFactory.HUE_RED && f <= 1.0f, "Transparency must be in the range [0..1]");
this.zzda = f;
return this;
}
public final GroundOverlayOptions zIndex(float f) {
this.zzcs = f;
return this;
}
public final GroundOverlayOptions visible(boolean z) {
this.zzct = z;
return this;
}
public final boolean isVisible() {
return this.zzct;
}
public final boolean isClickable() {
return this.zzcu;
}
public final float getZIndex() {
return this.zzcs;
}
public final float getWidth() {
return this.width;
}
public final float getTransparency() {
return this.zzda;
}
public final LatLng getLocation() {
return this.zzcy;
}
public final BitmapDescriptor getImage() {
return this.zzcx;
}
public final float getHeight() {
return this.height;
}
public final LatLngBounds getBounds() {
return this.zzcz;
}
public final float getBearing() {
return this.bearing;
}
public final float getAnchorV() {
return this.zzdc;
}
public final float getAnchorU() {
return this.zzdb;
}
public final GroundOverlayOptions clickable(boolean z) {
this.zzcu = z;
return this;
}
public final GroundOverlayOptions bearing(float f) {
this.bearing = ((f % 360.0f) + 360.0f) % 360.0f;
return this;
}
public final GroundOverlayOptions anchor(float f, float f2) {
this.zzdb = f;
this.zzdc = f2;
return this;
}
private final GroundOverlayOptions zza(LatLng latLng, float f, float f2) {
this.zzcy = latLng;
this.width = f;
this.height = f2;
return this;
}
}