Methods Summary |
---|
public void | clear()
scale = 1.0f;
offsetX = 0.0f;
offsetY = 0.0f;
|
public int | describeContents()
return 0;
|
private void | initFromParcel(android.os.Parcel parcel)
scale = parcel.readFloat();
offsetX = parcel.readFloat();
offsetY = parcel.readFloat();
|
public void | initialize(float scale, float offsetX, float offsetY)
if (scale < 1) {
throw new IllegalArgumentException("Scale must be greater than or equal to one!");
}
this.scale = scale;
this.offsetX = offsetX;
this.offsetY = offsetY;
|
public boolean | isNop()
return scale == 1.0f && offsetX == 0 && offsetY == 0;
|
public static android.view.MagnificationSpec | obtain(android.view.MagnificationSpec other)
MagnificationSpec info = obtain();
info.scale = other.scale;
info.offsetX = other.offsetX;
info.offsetY = other.offsetY;
return info;
|
public static android.view.MagnificationSpec | obtain()
MagnificationSpec spec = sPool.acquire();
return (spec != null) ? spec : new MagnificationSpec();
|
public void | recycle()
clear();
sPool.release(this);
|
public java.lang.String | toString()
StringBuilder builder = new StringBuilder();
builder.append("<scale:");
builder.append(scale);
builder.append(",offsetX:");
builder.append(offsetX);
builder.append(",offsetY:");
builder.append(offsetY);
builder.append(">");
return builder.toString();
|
public void | writeToParcel(android.os.Parcel parcel, int flags)
parcel.writeFloat(scale);
parcel.writeFloat(offsetX);
parcel.writeFloat(offsetY);
recycle();
|