2 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/event/events/pan-gesture/pan-gesture-processor.h>
21 #if defined(DEBUG_ENABLED)
29 #include <dali/integration-api/debug.h>
30 #include <dali/integration-api/trace.h>
31 #include <dali/internal/event/common/scene-impl.h>
32 #include <dali/internal/event/events/gesture-requests.h>
33 #include <dali/internal/event/events/multi-point-event-util.h>
34 #include <dali/internal/event/events/pan-gesture/pan-gesture-event.h>
35 #include <dali/internal/event/events/pan-gesture/pan-gesture-impl.h>
36 #include <dali/internal/event/events/pan-gesture/pan-gesture-recognizer.h>
37 #include <dali/internal/event/render-tasks/render-task-impl.h>
38 #include <dali/internal/update/gestures/scene-graph-pan-gesture.h>
39 #include <dali/internal/update/manager/update-manager.h>
40 #include <dali/public-api/actors/actor.h>
41 #include <dali/public-api/common/dali-common.h>
42 #include <dali/public-api/events/pan-gesture.h>
43 #include <dali/public-api/math/vector2.h>
49 namespace // unnamed namespace
51 DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_PERFORMANCE_MARKER, false);
52 #if defined(DEBUG_ENABLED)
53 Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_PAN_PROCESSOR");
55 const char* GESTURE_STATES[6] =
64 #endif // defined(DEBUG_ENABLED)
66 const unsigned long MAXIMUM_TIME_WITH_VALID_LAST_VELOCITY(50u);
69 * Functor which checks whether the specified actor is attached to the gesture detector.
70 * If the actor is attached, it also checks whether the number of touches of the current pan event
71 * are within the range of that expected by the detector.
72 * It returns true if it is no longer attached or the touches are out of range.
73 * This can be used in remove_if functions.
75 struct IsNotAttachedAndOutsideTouchesRangeFunctor
79 * @param[in] actor The actor to check whether it is attached.
80 * @param[in] touches The number of touches in the current pan event.
81 * @param[in] outsideRangeEmitters Reference to container where emitters outside of the touches range should be added.
83 IsNotAttachedAndOutsideTouchesRangeFunctor(Actor* actor, unsigned int touches, GestureDetectorContainer& outsideRangeEmitters)
84 : actorToCheck(actor),
85 numberOfTouches(touches),
86 outsideTouchesRangeEmitters(outsideRangeEmitters)
91 * Returns true if not attached, false if it is still attached.
92 * Additionally, checks if the number of touches has changed and stops sending the pan to a particular
93 * detector if it exceeds the range of that detector.
94 * @param[in] detector The detector to check.
95 * @return true, if not attached, false otherwise.
97 bool operator()(GestureDetector* detector) const
99 bool remove(!detector->IsAttached(*actorToCheck));
103 PanGestureDetector* panDetector(static_cast<PanGestureDetector*>(detector));
105 // Ensure number of touch points is within the range of our emitter. If it isn't then remove
106 // this emitter and add it to the outsideTouchesRangeEmitters container
107 if((numberOfTouches < panDetector->GetMinimumTouchesRequired()) ||
108 (numberOfTouches > panDetector->GetMaximumTouchesRequired()))
111 outsideTouchesRangeEmitters.push_back(detector);
118 Actor* actorToCheck; ///< The actor to check whether it is attached or not.
119 unsigned int numberOfTouches; ///< The number of touches in the pan event.
120 GestureDetectorContainer& outsideTouchesRangeEmitters; ///< Emitters that are outside of the range of current pan.
123 } // unnamed namespace
125 PanGestureProcessor::PanGestureProcessor(SceneGraph::UpdateManager& updateManager)
126 : GestureProcessor(GestureType::PAN),
127 mPanGestureDetectors(),
128 mCurrentPanEmitters(),
129 mCurrentRenderTask(),
130 mPossiblePanPosition(),
131 mMinTouchesRequired(1),
132 mMaxTouchesRequired(1),
133 mMaxMotionEventAge(std::numeric_limits<uint32_t>::max()),
134 mCurrentPanEvent(nullptr),
135 mSceneObject(SceneGraph::PanGesture::New()) // Create scene object to store pan information.
137 // Pass ownership to scene-graph; scene object lives for the lifecycle of UpdateManager
138 updateManager.SetPanGestureProcessor(mSceneObject);
141 PanGestureProcessor::~PanGestureProcessor()
143 mSceneObject = nullptr; // mSceneObject is owned and destroyed by update manager (there is only one of these for now)
146 void PanGestureProcessor::Process(Scene& scene, const PanGestureEvent& panEvent)
148 #if defined(DEBUG_ENABLED)
149 DALI_LOG_TRACE_METHOD(gLogFilter);
151 DALI_LOG_INFO(gLogFilter, Debug::General, " Pan Event\n");
152 DALI_LOG_INFO(gLogFilter, Debug::General, " State: %s Touches: %d Time: %d TimeDelta: %d\n", GESTURE_STATES[static_cast<uint8_t>(panEvent.state)], panEvent.numberOfTouches, panEvent.time, panEvent.timeDelta);
153 DALI_LOG_INFO(gLogFilter, Debug::General, " Positions: Current: (%.0f, %.0f), Previous: (%.0f, %.0f)\n", panEvent.currentPosition.x, panEvent.currentPosition.y, panEvent.previousPosition.x, panEvent.previousPosition.y);
156 DALI_TRACE_SCOPE(gTraceFilter, "DALI_PROCESS_PAN_GESTURE");
158 switch(panEvent.state)
160 case GestureState::POSSIBLE:
162 mCurrentPanEmitters.clear();
165 HitTestAlgorithm::Results hitTestResults;
168 SetActor(GetFeededActor());
169 mPossiblePanPosition = panEvent.currentPosition;
171 else if(HitTest(scene, panEvent.currentPosition, hitTestResults))
173 SetActor(&GetImplementation(hitTestResults.actor));
174 mPossiblePanPosition = panEvent.currentPosition;
179 case GestureState::STARTED:
181 // Requires a core update
184 // The pan gesture should only be sent to the gesture detector which first received it so that
185 // it can be told when the gesture ends as well.
187 HitTestAlgorithm::Results hitTestResults;
190 hitTestResults.actor = Dali::Actor(GetFeededActor());
191 hitTestResults.renderTask = GetFeededRenderTask();
194 GetFeededActor()->ScreenToLocal(*hitTestResults.renderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
195 hitTestResults.actorCoordinates = actorCoords;
199 HitTest(scene, panEvent.previousPosition, hitTestResults); // Hit Test previous position
202 if(hitTestResults.actor)
204 // If the current hit actor is different from the one we touched down on then set accordingly & update initial pan position
205 if(&GetImplementation(hitTestResults.actor) != GetCurrentGesturedActor())
207 mPossiblePanPosition = panEvent.previousPosition;
208 SetActor(&GetImplementation(hitTestResults.actor));
211 // Record the current render-task for Screen->Actor coordinate conversions
212 mCurrentRenderTask = hitTestResults.renderTask;
214 // Set mCurrentPanEvent to use inside overridden methods called in ProcessAndEmit()
215 mCurrentPanEvent = &panEvent;
218 ProcessAndEmitActor(hitTestResults, GetFeededGestureDetector());
222 ProcessAndEmit(hitTestResults);
224 mCurrentPanEvent = nullptr;
229 mCurrentPanEmitters.clear();
234 case GestureState::CONTINUING:
236 // Requires a core update
238 Actor* currentGesturedActor = GetCurrentGesturedActor();
239 if(GetFeededActor() && GetFeededActor() != currentGesturedActor && (mCurrentPanEmitters.empty() || (currentGesturedActor && currentGesturedActor->NeedGesturePropagation())) && GetFeededGestureDetector())
241 if(currentGesturedActor)
243 currentGesturedActor->SetNeedGesturePropagation(false);
245 mCurrentPanEvent = &panEvent;
246 if(GetFeededActor()->IsHittable() && CheckGestureDetector(GetFeededGestureDetector(), GetFeededActor()))
248 mCurrentPanEmitters.clear();
251 // Record the current render-task for Screen->Actor coordinate conversions
252 mCurrentRenderTask = GetFeededRenderTask();
255 GetFeededActor()->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
257 mCurrentPanEmitters.push_back(GetFeededGestureDetector());
258 SetActor(GetFeededActor());
259 GetFeededGestureDetector()->SetDetected(true);
260 EmitPanSignal(GetFeededActor(), mCurrentPanEmitters, panEvent, actorCoords, GestureState::STARTED, mCurrentRenderTask);
262 mCurrentPanEvent = nullptr;
267 case GestureState::FINISHED:
268 case GestureState::CANCELLED:
270 // Only send subsequent pan gesture signals if we processed the pan gesture when it started.
271 // Check if actor is still touchable.
272 Actor* currentGesturedActor = GetCurrentGesturedActor();
273 if(currentGesturedActor)
275 if(currentGesturedActor->IsHittable() && !mCurrentPanEmitters.empty() && mCurrentRenderTask)
277 GestureDetectorContainer outsideTouchesRangeEmitters;
279 if(!(GetFeededActor() && GetFeededGestureDetector()))
281 // Removes emitters that no longer have the actor attached
282 // Also remove emitters whose touches are outside the range of the current pan event and add them to outsideTouchesRangeEmitters
283 GestureDetectorContainer::iterator endIter = std::remove_if(mCurrentPanEmitters.begin(), mCurrentPanEmitters.end(), IsNotAttachedAndOutsideTouchesRangeFunctor(currentGesturedActor, panEvent.numberOfTouches, outsideTouchesRangeEmitters));
284 mCurrentPanEmitters.erase(endIter, mCurrentPanEmitters.end());
288 if(!outsideTouchesRangeEmitters.empty() || !mCurrentPanEmitters.empty())
290 currentGesturedActor->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoords.x, actorCoords.y, panEvent.currentPosition.x, panEvent.currentPosition.y);
291 // EmitPanSignal checks whether we have a valid actor and whether the container we are passing in has emitters before it emits the pan.
292 EmitPanSignal(currentGesturedActor, outsideTouchesRangeEmitters, panEvent, actorCoords, GestureState::FINISHED, mCurrentRenderTask);
293 EmitPanSignal(currentGesturedActor, mCurrentPanEmitters, panEvent, actorCoords, panEvent.state, mCurrentRenderTask);
296 if(mCurrentPanEmitters.empty())
298 // If we have no emitters attached then clear pan actor as well.
302 // Clear current gesture detectors if pan gesture has ended or been cancelled.
303 if((panEvent.state == GestureState::FINISHED) || (panEvent.state == GestureState::CANCELLED))
305 mCurrentPanEmitters.clear();
311 mCurrentPanEmitters.clear();
318 case GestureState::CLEAR:
320 DALI_ABORT("Incorrect state received from Integration layer: CLEAR\n");
326 void PanGestureProcessor::AddGestureDetector(PanGestureDetector* gestureDetector, Scene& scene, int32_t minDistance, int32_t minPanEvents)
328 bool firstRegistration(mPanGestureDetectors.empty());
330 mPanGestureDetectors.push_back(gestureDetector);
332 if(firstRegistration)
334 mMinTouchesRequired = gestureDetector->GetMinimumTouchesRequired();
335 mMaxTouchesRequired = gestureDetector->GetMaximumTouchesRequired();
336 mMaxMotionEventAge = gestureDetector->GetMaximumMotionEventAge();
338 PanGestureRequest request;
339 request.minTouches = mMinTouchesRequired;
340 request.maxTouches = mMaxTouchesRequired;
341 request.maxMotionEventAge = mMaxMotionEventAge;
343 Size size = scene.GetSize();
344 mGestureRecognizer = new PanGestureRecognizer(*this, Vector2(size.width, size.height), static_cast<const PanGestureRequest&>(request), minDistance, minPanEvents);
352 void PanGestureProcessor::RemoveGestureDetector(PanGestureDetector* gestureDetector)
354 if(!mCurrentPanEmitters.empty())
356 // Check if the removed detector was one that is currently being panned and remove it from emitters.
357 GestureDetectorContainer::iterator endIter = std::remove(mCurrentPanEmitters.begin(), mCurrentPanEmitters.end(), gestureDetector);
358 mCurrentPanEmitters.erase(endIter, mCurrentPanEmitters.end());
360 // If we no longer have any emitters, then we should clear mCurrentGesturedActor as well
361 if(mCurrentPanEmitters.empty())
367 // Find the detector...
368 PanGestureDetectorContainer::iterator endIter = std::remove(mPanGestureDetectors.begin(), mPanGestureDetectors.end(), gestureDetector);
369 DALI_ASSERT_DEBUG(endIter != mPanGestureDetectors.end());
372 mPanGestureDetectors.erase(endIter, mPanGestureDetectors.end());
374 if(mPanGestureDetectors.empty())
376 mGestureRecognizer = nullptr;
384 void PanGestureProcessor::GestureDetectorUpdated(PanGestureDetector* gestureDetector)
386 DALI_ASSERT_DEBUG(find(mPanGestureDetectors.begin(), mPanGestureDetectors.end(), gestureDetector) != mPanGestureDetectors.end());
391 bool PanGestureProcessor::SetPanGestureProperties(const Dali::PanGesture& pan)
393 // If we are currently processing a pan gesture then just ignore
394 if(mCurrentPanEmitters.empty() && mSceneObject)
396 const PanGesture& panImpl(GetImplementation(pan));
398 // We update the scene object directly rather than sending a message.
399 // Sending a message could cause unnecessary delays, the scene object ensure thread safe behaviour.
400 mSceneObject->AddGesture(panImpl);
402 if(GestureState::STARTED == panImpl.GetState() || GestureState::CONTINUING == panImpl.GetState())
411 void PanGestureProcessor::EnableProfiling()
413 mSceneObject->EnableProfiling();
416 void PanGestureProcessor::SetPredictionMode(int mode)
418 if((mode < 0) || (mode >= SceneGraph::PanGesture::NUM_PREDICTION_MODES))
420 mode = SceneGraph::PanGesture::DEFAULT_PREDICTION_MODE;
422 SceneGraph::PanGesture::PredictionMode modeEnum = static_cast<SceneGraph::PanGesture::PredictionMode>(mode);
423 mSceneObject->SetPredictionMode(modeEnum);
426 void PanGestureProcessor::SetPredictionAmount(unsigned int amount)
428 mSceneObject->SetPredictionAmount(amount);
431 void PanGestureProcessor::SetMaximumPredictionAmount(unsigned int amount)
433 mSceneObject->SetMaximumPredictionAmount(amount);
436 void PanGestureProcessor::SetMinimumPredictionAmount(unsigned int amount)
438 mSceneObject->SetMinimumPredictionAmount(amount);
441 void PanGestureProcessor::SetPredictionAmountAdjustment(unsigned int amount)
443 mSceneObject->SetPredictionAmountAdjustment(amount);
446 void PanGestureProcessor::SetSmoothingMode(int mode)
448 if((mode < 0) || (mode >= SceneGraph::PanGesture::NUM_SMOOTHING_MODES))
450 mode = SceneGraph::PanGesture::DEFAULT_SMOOTHING_MODE;
452 SceneGraph::PanGesture::SmoothingMode modeEnum = static_cast<SceneGraph::PanGesture::SmoothingMode>(mode);
453 mSceneObject->SetSmoothingMode(modeEnum);
456 void PanGestureProcessor::SetSmoothingAmount(float amount)
458 mSceneObject->SetSmoothingAmount(amount);
461 void PanGestureProcessor::SetUseActualTimes(bool value)
463 mSceneObject->SetUseActualTimes(value);
466 void PanGestureProcessor::SetInterpolationTimeRange(int value)
468 mSceneObject->SetInterpolationTimeRange(value);
471 void PanGestureProcessor::SetScalarOnlyPredictionEnabled(bool value)
473 mSceneObject->SetScalarOnlyPredictionEnabled(value);
476 void PanGestureProcessor::SetTwoPointPredictionEnabled(bool value)
478 mSceneObject->SetTwoPointPredictionEnabled(value);
481 void PanGestureProcessor::SetTwoPointInterpolatePastTime(int value)
483 mSceneObject->SetTwoPointInterpolatePastTime(value);
486 void PanGestureProcessor::SetTwoPointVelocityBias(float value)
488 mSceneObject->SetTwoPointVelocityBias(value);
491 void PanGestureProcessor::SetTwoPointAccelerationBias(float value)
493 mSceneObject->SetTwoPointAccelerationBias(value);
496 void PanGestureProcessor::SetMultitapSmoothingRange(int value)
498 mSceneObject->SetMultitapSmoothingRange(value);
501 const SceneGraph::PanGesture& PanGestureProcessor::GetSceneObject() const
503 return *mSceneObject;
506 void PanGestureProcessor::UpdateDetection()
508 DALI_ASSERT_DEBUG(!mPanGestureDetectors.empty());
510 uint32_t minimumRequired = std::numeric_limits<uint32_t>::max();
511 uint32_t maximumRequired = 0;
512 uint32_t maximumMotionEventAge = std::numeric_limits<uint32_t>::max();
514 for(PanGestureDetectorContainer::iterator iter = mPanGestureDetectors.begin(), endIter = mPanGestureDetectors.end(); iter != endIter; ++iter)
516 PanGestureDetector* detector(*iter);
520 uint32_t minimum = detector->GetMinimumTouchesRequired();
521 if(minimum < minimumRequired)
523 minimumRequired = minimum;
526 uint32_t maximum = detector->GetMaximumTouchesRequired();
527 if(maximum > maximumRequired)
529 maximumRequired = maximum;
532 uint32_t maximumAge = detector->GetMaximumMotionEventAge();
533 if(maximumAge < maximumMotionEventAge)
535 maximumMotionEventAge = maximumAge;
540 if((minimumRequired != mMinTouchesRequired) || (maximumRequired != mMaxTouchesRequired) || (maximumMotionEventAge != mMaxMotionEventAge))
542 mMinTouchesRequired = minimumRequired;
543 mMaxTouchesRequired = maximumRequired;
544 mMaxMotionEventAge = maximumMotionEventAge;
546 PanGestureRequest request;
547 request.minTouches = mMinTouchesRequired;
548 request.maxTouches = mMaxTouchesRequired;
549 request.maxMotionEventAge = mMaxMotionEventAge;
550 mGestureRecognizer->Update(request);
554 void PanGestureProcessor::EmitPanSignal(Actor* actor,
555 const GestureDetectorContainer& gestureDetectors,
556 const PanGestureEvent& panEvent,
557 Vector2 localCurrent,
559 RenderTaskPtr renderTask)
561 if(actor && !gestureDetectors.empty())
563 Internal::PanGesturePtr pan(new Internal::PanGesture(state));
565 pan->SetTime(panEvent.time);
567 pan->SetNumberOfTouches(panEvent.numberOfTouches);
568 pan->SetScreenPosition(panEvent.currentPosition);
569 pan->SetPosition(localCurrent);
570 pan->SetSourceType(panEvent.sourceType);
571 pan->SetSourceData(panEvent.sourceData);
573 RenderTask& renderTaskImpl(*renderTask.Get());
575 Vector2 localPrevious;
576 actor->ScreenToLocal(renderTaskImpl, localPrevious.x, localPrevious.y, panEvent.previousPosition.x, panEvent.previousPosition.y);
578 pan->SetDisplacement(localCurrent - localPrevious);
579 Vector2 previousPos(panEvent.previousPosition);
580 if(state == GestureState::STARTED)
582 previousPos = mPossiblePanPosition;
585 pan->SetScreenDisplacement(panEvent.currentPosition - previousPos);
587 // Avoid dividing by 0
588 if(panEvent.timeDelta > 0)
591 velocity.x = pan->GetDisplacement().x / static_cast<float>(panEvent.timeDelta);
592 velocity.y = pan->GetDisplacement().y / static_cast<float>(panEvent.timeDelta);
593 pan->SetVelocity(velocity);
595 Vector2 screenVelocity;
596 screenVelocity.x = pan->GetScreenDisplacement().x / static_cast<float>(panEvent.timeDelta);
597 screenVelocity.y = pan->GetScreenDisplacement().y / static_cast<float>(panEvent.timeDelta);
598 pan->SetScreenVelocity(screenVelocity);
601 // When the gesture ends, we may incorrectly get a ZERO velocity (as we have lifted our finger without any movement)
602 // so we should use the last recorded velocity instead in this scenario.
603 if((state == GestureState::FINISHED) && (pan->GetScreenVelocity() == Vector2::ZERO) &&
604 (panEvent.timeDelta < MAXIMUM_TIME_WITH_VALID_LAST_VELOCITY))
606 pan->SetVelocity(mLastVelocity);
607 pan->SetScreenVelocity(mLastScreenVelocity);
611 // Store the current velocity for future iterations.
612 mLastVelocity = pan->GetVelocity();
613 mLastScreenVelocity = pan->GetScreenVelocity();
618 // We update the scene object directly rather than sending a message.
619 // Sending a message could cause unnecessary delays, the scene object ensure thread safe behaviour.
620 mSceneObject->AddGesture(*pan.Get());
623 DALI_TRACE_BEGIN_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_EMIT_PAN_GESTURE_SIGNAL", [&](std::ostringstream& oss) {
624 oss << "[" << gestureDetectors.size() << "]";
627 Dali::Actor actorHandle(actor);
629 const GestureDetectorContainer::const_iterator endIter = gestureDetectors.end();
630 for(GestureDetectorContainer::const_iterator iter = gestureDetectors.begin(); iter != endIter; ++iter)
632 static_cast<PanGestureDetector*>(*iter)->EmitPanGestureSignal(actorHandle, Dali::PanGesture(pan.Get()));
635 DALI_TRACE_END_WITH_MESSAGE_GENERATOR(gTraceFilter, "DALI_EMIT_PAN_GESTURE_SIGNAL", [&](std::ostringstream& oss) {
636 oss << "[" << gestureDetectors.size() << "]";
641 void PanGestureProcessor::OnGesturedActorStageDisconnection()
643 mCurrentPanEmitters.clear();
646 bool PanGestureProcessor::CheckGestureDetector(GestureDetector* detector, Actor* actor)
648 DALI_ASSERT_DEBUG(mCurrentPanEvent);
651 PanGestureDetector* panDetector(static_cast<PanGestureDetector*>(detector));
653 if((mCurrentPanEvent->numberOfTouches >= panDetector->GetMinimumTouchesRequired()) &&
654 (mCurrentPanEvent->numberOfTouches <= panDetector->GetMaximumTouchesRequired()))
656 // Check if the detector requires directional panning.
657 if(panDetector->RequiresDirectionalPan() && mCurrentRenderTask)
659 // It does, calculate the angle of the pan in local actor coordinates and ensures it fits
660 // the detector's criteria.
661 RenderTask& renderTaskImpl = *mCurrentRenderTask.Get();
663 Vector2 startPosition, currentPosition;
664 actor->ScreenToLocal(renderTaskImpl, startPosition.x, startPosition.y, mPossiblePanPosition.x, mPossiblePanPosition.y);
665 actor->ScreenToLocal(renderTaskImpl, currentPosition.x, currentPosition.y, mCurrentPanEvent->currentPosition.x, mCurrentPanEvent->currentPosition.y);
666 Vector2 displacement(currentPosition - startPosition);
668 Radian angle(atanf(displacement.y / displacement.x));
670 /////////////////////////////
673 // Q3 (-,-) | Q4 (+,-) //
675 // ----------------- +x //
677 // Q2 (-,+) | Q1 (+,+) //
681 /////////////////////////////
683 // Quadrant 2: 180 degrees + angle
684 // Quadrant 3: angle - 180 degrees
686 /////////////////////////////
688 if(displacement.x < 0.0f)
690 if(displacement.y >= 0.0f)
693 angle.radian += Math::PI;
698 angle.radian -= Math::PI;
702 if(panDetector->CheckAngleAllowed(angle))
709 // Directional panning not required so we can use this actor and gesture detector.
716 void PanGestureProcessor::EmitGestureSignal(Actor* actor, const GestureDetectorContainer& gestureDetectors, Vector2 actorCoordinates)
718 DALI_ASSERT_DEBUG(mCurrentPanEvent);
720 mCurrentPanEmitters.clear();
723 actor->ScreenToLocal(*mCurrentRenderTask.Get(), actorCoordinates.x, actorCoordinates.y, mCurrentPanEvent->currentPosition.x, mCurrentPanEvent->currentPosition.y);
725 EmitPanSignal(actor, gestureDetectors, *mCurrentPanEvent, actorCoordinates, mCurrentPanEvent->state, mCurrentRenderTask);
729 mCurrentPanEmitters = gestureDetectors;
734 } // namespace Internal