Class PanGesture
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
A PanGesture is emitted when the user moves one or more fingers in a particular direction.
A pan gesture will end in the following ways:
- User releases the primary finger (the first touch).
- User has more fingers on the screen than the maximum specified.
- User has less fingers on the screen than the minimum specified.
- Cancelled by the system.
A pan gesture will continue to be sent to the actor under than initial pan until it ends.
C#Copypublic class PanGesture : Gesture, IDisposable
- Inheritance
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic PanGesture()
API Level: 3
Properties
Displacement
This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the amount panned since the user touched the screen.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y value means upwards.
Declaration
C#Copypublic Vector2 Displacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
Declaration
C#Copypublic uint NumberOfTouches { get; }
Property Value
Type | Description |
---|---|
System.UInt32 |
API Level: 3
Position
The current touch position of the primary touch point in local actor coordinates.
Declaration
C#Copypublic Vector2 Position { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
ScreenDisplacement
This is a Vector2 showing how much the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the amount panned since the user touched the screen.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y value means upwards.
This value is in screen coordinates.
Declaration
C#Copypublic Vector2 ScreenDisplacement { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
ScreenPosition
The current touch position of the primary touch point in screen coordinates.
Declaration
C#Copypublic Vector2 ScreenPosition { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
ScreenVelocity
The velocity at which the user is moving their fingers.
This is represented as a Vector2 and is the pixel movement per millisecond.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y values means upwards.
This value represents the screen coordinates.
Declaration
C#Copypublic Vector2 ScreenVelocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
Velocity
The velocity at which the user is moving their fingers.
This is represented as a Vector2 and is the pixel movement per millisecond.
A positive x value shows that the user is panning to the right, a negative x value means the opposite.
A positive y value shows that the user is panning downwards, a negative y values means upwards.
Declaration
C#Copypublic Vector2 Velocity { get; }
Property Value
Type | Description |
---|---|
Vector2 |
API Level: 3
Methods
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type |
Overrides
API Level: 3
GetDistance()
Returns the distance the user has panned (dragged) since the last pan gesture or,
if the gesture has just started, then the distance moved since the user touched the screen.
This is always a positive value.
Declaration
C#Copypublic float GetDistance()
Returns
Type | Description |
---|---|
Single | The distance, as a float, a user's finger has panned. |
API Level: 3
GetScreenDistance()
Returns the distance the user has panned (dragged) since the last pan gesture in screen
coordinates or, if the gesture has just started, then the distance in screen coordinates moved
since the user touched the screen.
This is always a positive value.
Declaration
C#Copypublic float GetScreenDistance()
Returns
Type | Description |
---|---|
Single | The distance, as a float, a user's finger has panned. |
API Level: 3
GetScreenSpeed()
Returns the speed at which the user is moving their fingers relative to screen coordinates.
This is the pixel movement per millisecond.
Declaration
C#Copypublic float GetScreenSpeed()
Returns
Type | Description |
---|---|
Single | The speed of the pan (in pixels per millisecond). |
API Level: 3
GetSpeed()
Returns the speed at which the user is moving their fingers.
This is the pixel movement per millisecond.
Declaration
C#Copypublic float GetSpeed()
Returns
Type | Description |
---|---|
Single | The speed of the pan (in pixels per millisecond). |