Table of Contents

Struct TouchLocation

Namespace
Microsoft.Xna.Framework.Input.Touch
Assembly
MonoGame.Framework.dll
public struct TouchLocation : IEquatable<TouchLocation>
Implements
Inherited Members

Constructors

TouchLocation(int, TouchLocationState, Vector2)

public TouchLocation(int id, TouchLocationState state, Vector2 position)

Parameters

id int
state TouchLocationState
position Vector2

TouchLocation(int, TouchLocationState, Vector2, TouchLocationState, Vector2)

public TouchLocation(int id, TouchLocationState state, Vector2 position, TouchLocationState previousState, Vector2 previousPosition)

Parameters

id int
state TouchLocationState
position Vector2
previousState TouchLocationState
previousPosition Vector2

Properties

Id

public int Id { get; }

Property Value

int

Position

public Vector2 Position { get; }

Property Value

Vector2

Pressure

public float Pressure { get; }

Property Value

float

State

public TouchLocationState State { get; }

Property Value

TouchLocationState

Methods

Equals(TouchLocation)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TouchLocation other)

Parameters

other TouchLocation

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

IsHighFrequencyEvent()

Returns true if the touch panel is configured to process high frequence touch events.

public bool IsHighFrequencyEvent()

Returns

bool

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

TryGetPreviousLocation(out TouchLocation)

public bool TryGetPreviousLocation(out TouchLocation aPreviousLocation)

Parameters

aPreviousLocation TouchLocation

Returns

bool

Operators

operator ==(TouchLocation, TouchLocation)

public static bool operator ==(TouchLocation value1, TouchLocation value2)

Parameters

value1 TouchLocation
value2 TouchLocation

Returns

bool

operator !=(TouchLocation, TouchLocation)

public static bool operator !=(TouchLocation value1, TouchLocation value2)

Parameters

value1 TouchLocation
value2 TouchLocation

Returns

bool