TouchCalibrationpublic class TouchCalibration extends Object implements android.os.ParcelableEncapsulates calibration data for input devices. |
Fields Summary |
---|
public static final TouchCalibration | IDENTITY | public static final Parcelable.Creator | CREATOR | private final float | mXScale | private final float | mXYMix | private final float | mXOffset | private final float | mYXMix | private final float | mYScale | private final float | mYOffset |
Constructors Summary |
---|
public TouchCalibration()Create a new TouchCalibration initialized to the identity transformation.
this(1,0,0,0,1,0);
| public TouchCalibration(float xScale, float xyMix, float xOffset, float yxMix, float yScale, float yOffset)Create a new TouchCalibration from affine transformation paramters.
mXScale = xScale;
mXYMix = xyMix;
mXOffset = xOffset;
mYXMix = yxMix;
mYScale = yScale;
mYOffset = yOffset;
| public TouchCalibration(android.os.Parcel in)
mXScale = in.readFloat();
mXYMix = in.readFloat();
mXOffset = in.readFloat();
mYXMix = in.readFloat();
mYScale = in.readFloat();
mYOffset = in.readFloat();
|
Methods Summary |
---|
public int | describeContents()
return 0;
| public boolean | equals(java.lang.Object obj)
if (obj == this) {
return true;
} else if (obj instanceof TouchCalibration) {
TouchCalibration cal = (TouchCalibration)obj;
return (cal.mXScale == mXScale) &&
(cal.mXYMix == mXYMix) &&
(cal.mXOffset == mXOffset) &&
(cal.mYXMix == mYXMix) &&
(cal.mYScale == mYScale) &&
(cal.mYOffset == mYOffset);
} else {
return false;
}
| public float[] | getAffineTransform()
return new float[] { mXScale, mXYMix, mXOffset, mYXMix, mYScale, mYOffset };
| public int | hashCode()
return Float.floatToIntBits(mXScale) ^
Float.floatToIntBits(mXYMix) ^
Float.floatToIntBits(mXOffset) ^
Float.floatToIntBits(mYXMix) ^
Float.floatToIntBits(mYScale) ^
Float.floatToIntBits(mYOffset);
| public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeFloat(mXScale);
dest.writeFloat(mXYMix);
dest.writeFloat(mXOffset);
dest.writeFloat(mYXMix);
dest.writeFloat(mYScale);
dest.writeFloat(mYOffset);
|
|