avalonia-interop-rendering
Installation
SKILL.md
Avalonia Advanced Rendering & Native Interop
Basic Render(DrawingContext), brushes, geometry and animations: see avalonia-custom-controls and avalonia-graphics-animation. Version labels: see avalonia-versions. This skill covers what sits below/beside them.
Which Tool?
| Need | Use |
|---|---|
| Draw shapes/text in a control | Render(DrawingContext) (other skills) |
| Raw SkiaSharp calls (SKCanvas, shaders, SKPath effects) | ICustomDrawOperation + ISkiaSharpApiLeaseFeature |
| Animation/redraw loop on the render thread, independent of UI thread | Composition custom visual (CompositionCustomVisualHandler) |
| Animate offset/opacity/scale of an existing control on the compositor | Composition implicit/explicit animations |
| Own OpenGL scene | OpenGlControlBase |
| Per-pixel CPU image | WriteableBitmap + Lock() |
| Real native widget (HWND, NSView, X11 window) inside the tree | NativeControlHost |
| Avalonia inside another UI toolkit | WinForms host, EmbeddableControlRoot, Avalonia.WinUI (12.1+) |
Composition API
Namespace Avalonia.Rendering.Composition. Compositor objects live on the render thread; UI-thread properties are copied across.