Show / Hide Table of Contents

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
Inheritance
object
OsdWindow
osdRect
Inherited Members
OsdWindow.Dispose(bool)
OsdWindow.Dispose()
OsdWindow.Close()
OsdWindow.Hwnd
OsdWindow.IsHandleCreated
OsdWindow.Redraw()
OsdWindow.Invalidate()
OsdWindow.Opacity
OsdWindow.TransparentColor
OsdWindow.Rect
OsdWindow.Visible
OsdWindow.Show()
OsdWindow.Hide()
OsdWindow.WndProc(wnd, int, nint, nint)
OsdWindow.Shadow
OsdWindow.ClickToClose
OsdWindow.Name
OsdWindow.closeAll(string)

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.