mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
[NDK] fix gesture c-api
Signed-off-by:lisitaolisitao3@huawei.com Signed-off-by: lisitao <lisitao3@huawei.com> Change-Id: I06cab2f035618c3d32c9d7817615692e284f9838
This commit is contained in:
parent
23032a7a79
commit
2151af74d1
@ -992,7 +992,7 @@ struct ArkUIAPIEventGestureAsyncEvent {
|
||||
ArkUI_Float32 scale;
|
||||
ArkUI_Float32 pinchCenterX;
|
||||
ArkUI_Float32 pinchCenterY;
|
||||
ArkUI_Int32 speed;
|
||||
ArkUI_Float32 speed;
|
||||
ArkUI_Int32 timestamp;
|
||||
ArkUI_Int32 source;
|
||||
ArkUI_Int32 pressure;
|
||||
|
@ -240,6 +240,7 @@ void GetGestureEvent(ArkUIAPIEventGestureAsyncEvent& ret, GestureEvent& info)
|
||||
ret.scale = info.GetScale();
|
||||
ret.pinchCenterX = info.GetPinchCenter().GetX();
|
||||
ret.pinchCenterY = info.GetPinchCenter().GetY();
|
||||
ret.speed = info.GetSpeed();
|
||||
ret.source = static_cast<int32_t>(info.GetSourceDevice());
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ float OH_ArkUI_SwipeGesture_GetAngle(const ArkUI_GestureEvent* event)
|
||||
|
||||
float OH_ArkUI_SwipeGesture_GetVelocity(const ArkUI_GestureEvent* event)
|
||||
{
|
||||
return event->eventData.velocity;
|
||||
return event->eventData.speed;
|
||||
}
|
||||
|
||||
float OH_ArkUI_RotationGesture_GetAngle(const ArkUI_GestureEvent* event)
|
||||
|
Loading…
Reference in New Issue
Block a user