Table of Contents

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

x int

The x-coordinate of the upper-left corner of the rectangle.

y int

The y-coordinate of the upper-left corner of the rectangle.

width int

The width of the rectangle.

height int

The height of the rectangle.

target object

The object that will receive touch events for this region.

Fields

Height

Gets the height of this active rectangle.

public readonly int Height

Field Value

int

Target

Gets the target object associated with this active rectangle.

public readonly object Target

Field Value

object

Width

Gets the width of this active rectangle.

public readonly int Width

Field Value

int

X

Gets the x-coordinate of the top-left corner of this active rectangle.

public readonly int X

Field Value

int

Y

Gets the y-coordinate of the top-left corner of this active rectangle.

public readonly int Y

Field Value

int

Methods

Contains(TouchInput)

Determines whether the specified touch input is within the bounds of this TouchScreen.ActiveRectangle object.

public bool Contains(TouchInput input)

Parameters

input TouchInput

The touch input to test.

Returns

bool

true if the touch input is within the bounds of this TouchScreen.ActiveRectangle object; otherwise, false.