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#
Copy
public class PanGesture : Gesture, IDisposable
Inheritance
System.Object
PanGesture
Implements
System.IDisposable

Constructors

View Source

PanGesture()

The default constructor.

Declaration
C#
Copy
public PanGesture()
API Level: 3

Properties

View Source

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#
Copy
public Vector2 Displacement { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

NumberOfTouches

The total number of fingers touching the screen in a pan gesture.

Declaration
C#
Copy
public uint NumberOfTouches { get; }
Property Value
Type Description
System.UInt32
API Level: 3
View Source

Position

The current touch position of the primary touch point in local actor coordinates.

Declaration
C#
Copy
public Vector2 Position { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

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#
Copy
public Vector2 ScreenDisplacement { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

ScreenPosition

The current touch position of the primary touch point in screen coordinates.

Declaration
C#
Copy
public Vector2 ScreenPosition { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

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#
Copy
public Vector2 ScreenVelocity { get; }
Property Value
Type Description
Vector2
API Level: 3
View Source

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#
Copy
public Vector2 Velocity { get; }
Property Value
Type Description
Vector2
API Level: 3

Methods

View Source

Dispose(DisposeTypes)

Dispose.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type
Overrides
API Level: 3
View Source

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#
Copy
public float GetDistance()
Returns
Type Description
Single

The distance, as a float, a user's finger has panned.

API Level: 3
View Source

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#
Copy
public float GetScreenDistance()
Returns
Type Description
Single

The distance, as a float, a user's finger has panned.

API Level: 3
View Source

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#
Copy
public float GetScreenSpeed()
Returns
Type Description
Single

The speed of the pan (in pixels per millisecond).

API Level: 3
View Source

GetSpeed()

Returns the speed at which the user is moving their fingers.
This is the pixel movement per millisecond.

Declaration
C#
Copy
public float GetSpeed()
Returns
Type Description
Single

The speed of the pan (in pixels per millisecond).

API Level: 3

Implements

System.IDisposable