Color legend plain property method
A rectangle of the desktop, in the displays’ own pixels.
A readonly record struct, in the namespace BorrowedTorch.Capabilities, compared by its four values. The primary display’s top left corner is 0, 0, and a display left of it or above it has negative coordinates. Display.Bounds and Display.WorkArea are rectangles of the desktop. The displays page shows it in context.
Names are colored by what they are: a property or a method; values and fields keep the plain color.
Properties
Bottom →
int · Read-only. The row just below the rectangle: Y + Height.
Height →
int · How many rows the rectangle spans.
Right →
int · Read-only. The column just right of the rectangle: X + Width.
Width →
int · How many columns the rectangle spans.
X →
int · The rectangle’s left column.
Y →
int · The rectangle’s top row.
Methods
Contains() →
Contains(int x, int y) · Returns whether a pixel is in the rectangle: from X and Y up to Right and Bottom, not including them.
| Parameter | Type | Description |
|---|---|---|
x |
int |
The pixel’s column. |
y |
int |
The pixel’s row. |
Contains(PixelRectangle other) · Returns whether another rectangle lies wholly in this one; one with the same edges does.
| Parameter | Type | Description |
|---|---|---|
other |
PixelRectangle |
The other rectangle. |
PixelRectangle(int, int, int, int) →
PixelRectangle(int X, int Y, int Width, int Height) · A rectangle at a place on the desktop, of a size.
| Parameter | Type | Description |
|---|---|---|
X |
int |
The left column. |
Y |
int |
The top row. |
Width |
int |
How many columns it spans. |
Height |
int |
How many rows it spans. |