Struct MagnificationGesture
A magnification gesture received from a magic trackpad.
Implements
Inherited Members
Namespace: Unity.AppUI.Core
Assembly: solution.dll
Syntax
public struct MagnificationGesture : IEquatable<MagnificationGesture>
Constructors
MagnificationGesture(float, TouchPhase)
Constructor.
Declaration
public MagnificationGesture(float deltaMagnification, TouchPhase phase)
Parameters
Type | Name | Description |
---|---|---|
float | deltaMagnification | The magnification delta of the gesture since the last frame. |
TouchPhase | phase | The phase of the gesture. |
Properties
deltaMagnification
The magnification delta of the gesture since the last frame.
Declaration
public float deltaMagnification { get; }
Property Value
Type | Description |
---|---|
float |
phase
The phase of the gesture.
Declaration
public TouchPhase phase { get; }
Property Value
Type | Description |
---|---|
TouchPhase |
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.
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 MagnificationGesture is equal to the second MagnificationGesture, false otherwise. |
Overrides
Equals(MagnificationGesture)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(MagnificationGesture other)
Parameters
Type | Name | Description |
---|---|---|
MagnificationGesture | 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
Operators
operator ==(MagnificationGesture, MagnificationGesture)
Determines whether two specified MagnificationGesture objects are equal.
Declaration
public static bool operator ==(MagnificationGesture left, MagnificationGesture right)
Parameters
Type | Name | Description |
---|---|---|
MagnificationGesture | left | The first MagnificationGesture to compare. |
MagnificationGesture | right | The second MagnificationGesture to compare. |
Returns
Type | Description |
---|---|
bool | True if the first MagnificationGesture is equal to the second MagnificationGesture, false otherwise. |
operator !=(MagnificationGesture, MagnificationGesture)
Determines whether two specified MagnificationGesture objects are not equal.
Declaration
public static bool operator !=(MagnificationGesture left, MagnificationGesture right)
Parameters
Type | Name | Description |
---|---|---|
MagnificationGesture | left | The first MagnificationGesture to compare. |
MagnificationGesture | right | The second MagnificationGesture to compare. |
Returns
Type | Description |
---|---|
bool | True if the first MagnificationGesture is not equal to the second MagnificationGesture, false otherwise. |