2019-08-23 12:35 AM
2019-08-23 04:44 AM
Hi @Fanny XU,
TouchGFX doesn't support multi touch. The TouchController interface is based on a single set of coordinates and whether a touch was registered or not.
/**
* @fn virtual bool TouchController::sampleTouch(int32_t& x, int32_t& y) = 0;
*
* @brief Checks whether the touch screen is being touched, and if so, what coordinates.
*
* Checks whether the touch screen is being touched, and if so, what coordinates.
*
* @param [out] x The x position of the touch
* @param [out] y The y position of the touch
*
* @return True if a touch has been detected, otherwise false.
*/
virtual bool sampleTouch(int32_t& x, int32_t& y) = 0;
If you have a touch controller IC that can do multi-touch you could probably imeplement these as special events and propagate them to your active views.
Best regards,
Martin
2019-08-23 04:44 AM
Hi @Fanny XU,
TouchGFX doesn't support multi touch. The TouchController interface is based on a single set of coordinates and whether a touch was registered or not.
/**
* @fn virtual bool TouchController::sampleTouch(int32_t& x, int32_t& y) = 0;
*
* @brief Checks whether the touch screen is being touched, and if so, what coordinates.
*
* Checks whether the touch screen is being touched, and if so, what coordinates.
*
* @param [out] x The x position of the touch
* @param [out] y The y position of the touch
*
* @return True if a touch has been detected, otherwise false.
*/
virtual bool sampleTouch(int32_t& x, int32_t& y) = 0;
If you have a touch controller IC that can do multi-touch you could probably imeplement these as special events and propagate them to your active views.
Best regards,
Martin
2019-08-29 03:48 AM
Hi Martin
Thank you very much for your reply. And is it possible to have all widgets support multi-touch in the way you describe? For example, the zoom of a picture is operated by two fingers.
2019-08-29 05:57 AM
You would need to change the behavior of all widgets to support multi-touch, because the code written for them only understand click-, drag- or gestureEvents (limited to swipe). But this is entirely possible to do, to have a specialized version of the widgets you want to add multi-touch to. e.g. If you're looking to add zoom to a static image you could combine ScaleableImage (uses the texturemapper) with multi-touch. It would be an expensive widget.
/Martin
2019-08-29 09:54 PM
OK,thank you for your answer.
2019-08-30 12:40 AM
You're welcome!
/Martin