Skip to main content

Struct TouchPoint

Represents data for touchscreen events

Assembly: Meadow.Contracts.dll
View Source
Declaration
public readonly struct TouchPoint : IEquatable<TouchPoint?>, IEquatable<TouchPoint>

Implements:
System.IEquatable<System.Nullable<Meadow.Hardware.TouchPoint>>, System.IEquatable<Meadow.Hardware.TouchPoint>

Properties

RawX

Gets the raw X position data of the touch point

View Source
Declaration
public int RawX { get; }

RawY

Gets the raw Y position data of the touch point

View Source
Declaration
public int RawY { get; }

RawZ

Gets the raw Z position data of the touch point

View Source
Declaration
public int? RawZ { get; }

ScreenX

Gets the screen-coordinate X position of the touch point

View Source
Declaration
public int ScreenX { get; }

ScreenY

Gets the screen-coordinate Y position of the touch point

View Source
Declaration
public int ScreenY { get; }

ScreenZ

Gets the screen-coordinate Z position of the touch point

View Source
Declaration
public int? ScreenZ { get; }

Methods

FromRawData(int, int, int?)

Creates a TouchPoint from raw touchscreen data

View Source
Declaration
public static TouchPoint FromRawData(int rawX, int rawY, int? rawZ)
Returns

Meadow.Hardware.TouchPoint

Parameters
TypeNameDescription
System.Int32rawXThe raw X position data
System.Int32rawYThe raw Y position data
System.Nullable<System.Int32>rawZThe raw Z position data

FromScreenData(int, int, int, int, int, int?)

Creates a TouchPoint from screen coordinates and raw screen data

View Source
Declaration
public static TouchPoint FromScreenData(int screenX, int screenY, int screenZ, int rawX, int rawY, int? rawZ)
Returns

Meadow.Hardware.TouchPoint

Parameters
TypeNameDescription
System.Int32screenXThe X screen position
System.Int32screenYThe Y screen position
System.Int32screenZThe Z screen position
System.Int32rawXThe raw X position data
System.Int32rawYThe raw Y position data
System.Nullable<System.Int32>rawZThe raw Z position data

Equals(TouchPoint)

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

View Source
Declaration
public bool Equals(TouchPoint other)
Returns

System.Boolean: true if the current object is equal to the <code class="paramref">other</code> parameter; otherwise, false.

Parameters
TypeNameDescription
Meadow.Hardware.TouchPointotherAn object to compare with this object.

Equals(TouchPoint?)

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

View Source
Declaration
public bool Equals(TouchPoint? other)
Returns

System.Boolean: true if the current object is equal to the <code class="paramref">other</code> parameter; otherwise, false.

Parameters
TypeNameDescription
System.Nullable<Meadow.Hardware.TouchPoint>otherAn object to compare with this object.

ToString()

Returns the fully qualified type name of this instance.

View Source
Declaration
public override string ToString()
Returns

System.String: The fully qualified type name.

Implements

  • System.IEquatable<System.Nullable<Meadow.Hardware.TouchPoint>>
  • System.IEquatable<Meadow.Hardware.TouchPoint>