Class TouchScreen.ActiveRectangle
- Namespace
- nanoFramework.UI
- Assembly
- nanoFramework.Graphics.dll
Represents a rectangular region of the touch screen that can receive touch events.
public class TouchScreen.ActiveRectangle
- Inheritance
-
TouchScreen.ActiveRectangle
- Inherited Members
- Extension Methods
Constructors
ActiveRectangle(int, int, int, int, object)
Initializes a new instance of the TouchScreen.ActiveRectangle class with the specified location, size, and target object.
public ActiveRectangle(int x, int y, int width, int height, object target)
Parameters
xintThe x-coordinate of the upper-left corner of the rectangle.
yintThe y-coordinate of the upper-left corner of the rectangle.
widthintThe width of the rectangle.
heightintThe height of the rectangle.
targetobjectThe object that will receive touch events for this region.
Fields
Height
Gets the height of this active rectangle.
public readonly int Height
Field Value
Target
Gets the target object associated with this active rectangle.
public readonly object Target
Field Value
Width
Gets the width of this active rectangle.
public readonly int Width
Field Value
X
Gets the x-coordinate of the top-left corner of this active rectangle.
public readonly int X
Field Value
Y
Gets the y-coordinate of the top-left corner of this active rectangle.
public readonly int Y
Field Value
Methods
Contains(TouchInput)
Determines whether the specified touch input is within the bounds of this TouchScreen.ActiveRectangle object.
public bool Contains(TouchInput input)
Parameters
inputTouchInputThe touch input to test.
Returns
- bool
true if the touch input is within the bounds of this TouchScreen.ActiveRectangle object; otherwise, false.