Class osdRect
Shows a mouse-transparent rectangle on screen. Just visible outline, or filled but partially transparent.
public class osdRect : OsdWindow, IDisposable
Remarks
Creates a temporary partially transparent window, and draws rectangle in it. Can draw multiple rectangles.
Examples
using (var x = new osdRect()) {
x.Rect = (300, 300, 100, 100);
x.Color = System.Drawing.Color.SlateBlue;
x.Thickness = 4;
x.Show();
for (int i = 0; i < 5; i++) {
250.ms();
x.Visible = !x.Visible;
}
}
Namespace: Au
Assembly: Au.dll
Inherited Members
Constructors
Name | Description |
---|---|
osdRect() |
Properties
Name | Description |
---|---|
Color | Gets or sets rectangle color. |
Thickness | Gets or sets rectangle frame width. Used only if OsdWindow.Opacity is 0 (default). |
Methods
Name | Description |
---|---|
OnPaint(nint, Graphics, RECT) | Called when the OSD window must be drawn or redrawn. Draws rectangle. More info: OsdWindow.OnPaint. |
SetRects(IEnumerable<RECT>, bool, ORLabelOptions) | Sets to draw multiple rectangles. |
SetRects(IEnumerable<(RECT r, string s)>, ORLabelOptions) | Sets to draw multiple rectangles with labels. |