Struct PinchGesture
A pinch gesture result that is defined by a PinchGestureRecognizer.
Implements
Inherited Members
Namespace: Unity.AppUI.Core
Assembly: Unity.AppUI.dll
Syntax
public struct PinchGesture : IEquatable<PinchGesture>
Constructors
PinchGesture(float, GestureRecognizerState)
Constructor.
Declaration
public PinchGesture(float deltaMagnification, GestureRecognizerState state)
Parameters
Type | Name | Description |
---|---|---|
float | deltaMagnification | The magnification delta of the gesture since the last frame. |
GestureRecognizerState | state | The phase of the gesture. |
Properties
deltaMagnification
The magnification delta of the gesture since the last frame.
Declaration
public readonly float deltaMagnification { get; }
Property Value
Type | Description |
---|---|
float |
scrollDelta
The scroll delta of the gesture since the last frame.
Declaration
public Vector2 scrollDelta { get; }
Property Value
Type | Description |
---|---|
Vector2 |
Remarks
This is a convenience property to convert the magnification delta to a scroll delta.
state
The state of the gesture.
Declaration
public readonly GestureRecognizerState state { get; }
Property Value
Type | Description |
---|---|
GestureRecognizerState |
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | True if the first PinchGesture is equal to the second PinchGesture, false otherwise. |
Overrides
Equals(PinchGesture)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(PinchGesture other)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | True if objects are equal, false otherwise. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
ToString()
Returns a string that represents the current PinchGesture.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current PinchGesture. |
Overrides
Operators
operator ==(PinchGesture, PinchGesture)
Determines whether two specified PinchGesture objects are equal.
Declaration
public static bool operator ==(PinchGesture left, PinchGesture right)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | left | The first PinchGesture to compare. |
PinchGesture | right | The second PinchGesture to compare. |
Returns
Type | Description |
---|---|
bool | True if the first PinchGesture is equal to the second PinchGesture, false otherwise. |
operator !=(PinchGesture, PinchGesture)
Determines whether two specified PinchGesture objects are not equal.
Declaration
public static bool operator !=(PinchGesture left, PinchGesture right)
Parameters
Type | Name | Description |
---|---|---|
PinchGesture | left | The first PinchGesture to compare. |
PinchGesture | right | The second PinchGesture to compare. |
Returns
Type | Description |
---|---|
bool | True if the first PinchGesture is not equal to the second PinchGesture, false otherwise. |