跳轉到主要內容

TouchCalibration

touchgfx/transforms/TouchCalibration.hpp

Calibrates a touch coordinate. Class TouchCalibraiton is responsible for translating coordinates (Point) based on matrix of calibration values.

Public Functions

TouchCalibration()
voidsetCalibrationMatrix(const Point ref, const Point scr)
Initializes the calibration matrix based on reference and measured values.
voidtranslatePoint(Point & p)
Translates the specified point using the matrix.

Public Functions Documentation

TouchCalibration

setCalibrationMatrix

static void setCalibrationMatrix(const Point *ref ,
const Point *scr
)

Initializes the calibration matrix based on reference and measured values.

Parameters:
refPointer to array of three reference points.
scrPointer to array of three measured points.

translatePoint

static void translatePoint(Point &p)

Translates the specified point using the matrix.

If matrix has not been initialized, p is not modified.

Parameters:
pThe point to translate.