FileDocCategorySizeDatePackage
TouchCalibration.javaAPI DocAndroid 5.1 API4059Thu Mar 12 22:22:10 GMT 2015android.hardware.input

TouchCalibration

public class TouchCalibration extends Object implements android.os.Parcelable
Encapsulates calibration data for input devices.
hide

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.

param
xScale Influence of input x-axis value on output x-axis value.
param
xyMix Influence of input y-axis value on output x-axis value.
param
xOffset Constant offset to be applied to output x-axis value.
param
yXMix Influence of input x-axis value on output y-axis value.
param
yScale Influence of input y-axis value on output y-axis value.
param
yOffset Constant offset to be applied to output y-axis value.

        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 intdescribeContents()

        return 0;
    
public booleanequals(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 inthashCode()

        return Float.floatToIntBits(mXScale)  ^
               Float.floatToIntBits(mXYMix)   ^
               Float.floatToIntBits(mXOffset) ^
               Float.floatToIntBits(mYXMix)   ^
               Float.floatToIntBits(mYScale)  ^
               Float.floatToIntBits(mYOffset);
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeFloat(mXScale);
        dest.writeFloat(mXYMix);
        dest.writeFloat(mXOffset);
        dest.writeFloat(mYXMix);
        dest.writeFloat(mYScale);
        dest.writeFloat(mYOffset);