AI OSD: Screen Overlay
AI-first map of Blazor screen overlay and OSD canvas APIs.
Screen Overlay / Blazor OSD Discovery Map
Reference map for drawing screen annotations through the Blazor-backed overlay canvas: rectangles, HTML labels, Razor components, and CV debug boxes.
Interactive picking belongs to osd/selection.md.
User Intents
- Draw a rectangle around a region.
- Show HTML label or badge over the desktop.
- Render a Razor component as a floating annotation.
- Display CV/ML bounding boxes.
- Open overlay WebView DevTools.
Concept Model
IOnScreenServicecreates owner-scoped canvases.IOnScreenCanvasScriptingApiis the script-facing canvas factory.IOnScreenCanvasownsIOnScreenObjectinstances byOnScreenObjectId.- Canvas visibility is owner-scoped: hiding one canvas temporarily removes its objects from rendering without affecting other canvases or discarding the hidden owner's objects.
- Objects use desktop screen coordinates.
- Current rendered object contracts are
IOnScreenRectangle,IOnScreenHtml, andIOnScreenRazor. - The renderer uses a transparent click-through Blazor/WebView window internally; consumers should use canvas/object APIs.
API Details
IOnScreenService- runtime canvas factory and DevTools hook.IOnScreenCanvasScriptingApi- script-facing canvas factory.IOnScreenCanvas-ObjectsById,IsVisible,AddOrUpdate,Remove,Clear,ShowDevTools.IOnScreenObject-Id,Location,Size,Opacity,IsVisible.IOnScreenRectangle-Background,BorderColor,BorderThickness.IOnScreenHtml- raw trustedHtml.IOnScreenRazor-ViewTypeandDataContext.OnScreenCanvasExtensions-AddRectangle,AddHtmlObject,AddRazor<T>.
Prefer
- Prefer
IOnScreenCanvasScriptingApifor script-owned overlays. - Prefer
IOnScreenServicefor app/runtime code. - Prefer
AddRectangle,AddHtmlObject, andAddRazor<T>for built-in objects. - Prefer disposing objects/canvas for cleanup.
- Prefer
windows-subsystems/blazor-windows.mdfor real windows. - Prefer
nuget/imgui-sdk.mdfor ImGui UI.
Avoid
- Avoid creating custom transparent WebView windows for simple annotations.
- Avoid untrusted HTML in
IOnScreenHtml. - Avoid using screen overlay as an input picker.
Research Anchors
IOnScreenCanvas,IOnScreenCanvasScriptingApi,IOnScreenService,IOnScreenObject,IOnScreenRectangle,IOnScreenHtml,IOnScreenRazor,OnScreenCanvasExtensions,AddRectangle,AddHtmlObject,AddRazor,OnScreenOverlayComponent.
Search Synonyms
- screen overlay
- Blazor OSD
- desktop overlay
- click-through overlay
- bounding box overlay
- debug overlay
- HTML overlay
- Razor overlay
- screen annotation
Related Maps
osd/selection.mdwindows-subsystems/blazor-windows.mdnuget/imgui-sdk.mdcomputer-vision/images.md