Pinch gesture recognizer. More...
#include <PinchRecognizer.h>


Public Member Functions | |
| float | scale () const |
| Get the current scale. | |
| float | scaleSpeed () const |
| Gets current scale speed. | |
| float | distance () const |
| Get the current pinch distance. | |
| virtual void | reset () |
| Reset the gesture data. | |
| virtual void | touchEvent (const PlatformTouchEvent &) |
| Feed new data. | |
Private Attributes | |
| float | m_scale |
| float | m_distance |
| GestureSpeedCalc | m_speed |
Pinch gesture recognizer.
Definition at line 29 of file PinchRecognizer.h.
| WebCore::PinchRecognizer::distance | ( | ) | const [inline] |
Get the current pinch distance.
Definition at line 35 of file PinchRecognizer.h.
References m_distance.
| void WebCore::PinchRecognizer::reset | ( | ) | [virtual] |
Reset the gesture data.
Resets the gesture data e.g. when the pinch gesture starts over.
Reimplemented from WebCore::GestureRecognizer.
Definition at line 33 of file PinchRecognizer.cpp.
References m_distance, WebCore::GestureRecognizer::m_refresh, and m_scale.
| WebCore::PinchRecognizer::scale | ( | ) | const [inline] |
Get the current scale.
Get the current scale from the pinch gesture.
Definition at line 33 of file PinchRecognizer.h.
References m_scale.
| WebCore::PinchRecognizer::scaleSpeed | ( | ) | const [inline] |
Gets current scale speed.
Get the current scale speed from the pinch gesture, as scale amount per second.
Definition at line 34 of file PinchRecognizer.h.
References m_speed, and WebCore::GestureSpeedCalc::speed().

| void WebCore::PinchRecognizer::touchEvent | ( | const PlatformTouchEvent & | ev | ) | [virtual] |
Feed new data.
Processes the touch event and calculates new data for the pinch gesture.
| Platform | touch event |
Implements WebCore::GestureRecognizer.
Definition at line 46 of file PinchRecognizer.cpp.
References WebCore::GestureRecognizer::calcDistance(), WebCore::GestureSpeedCalc::firstSample(), WebCore::GestureSpeedCalc::insertSample(), m_distance, WebCore::GestureRecognizer::m_id1i, WebCore::GestureRecognizer::m_id2i, WebCore::GestureRecognizer::m_refresh, m_scale, m_speed, WebCore::GestureRecognizer::selectValidPoints(), and WebCore::GestureRecognizer::updateRefreshState().

float WebCore::PinchRecognizer::m_distance [private] |
Definition at line 45 of file PinchRecognizer.h.
float WebCore::PinchRecognizer::m_scale [private] |
Definition at line 44 of file PinchRecognizer.h.
Definition at line 46 of file PinchRecognizer.h.
1.6.2-20100208