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() | |
void | setCalibrationMatrix(const Point ref, const Point scr) |
Initializes the calibration matrix based on reference and measured values. | |
void | translatePoint(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:
ref | Pointer to array of three reference points. |
scr | Pointer 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:
p | The point to translate. |