LoomEditor.Rendering
0.5.0
See the version list below for details.
dotnet add package LoomEditor.Rendering --version 0.5.0
NuGet\Install-Package LoomEditor.Rendering -Version 0.5.0
<PackageReference Include="LoomEditor.Rendering" Version="0.5.0" />
<PackageVersion Include="LoomEditor.Rendering" Version="0.5.0" />
<PackageReference Include="LoomEditor.Rendering" />
paket add LoomEditor.Rendering --version 0.5.0
#r "nuget: LoomEditor.Rendering, 0.5.0"
#:package LoomEditor.Rendering@0.5.0
#addin nuget:?package=LoomEditor.Rendering&version=0.5.0
#tool nuget:?package=LoomEditor.Rendering&version=0.5.0
LoomEditor.Rendering
Install
dotnet add package LoomEditor.Rendering --prerelease
--prerelease is needed while the version has a suffix (for example 0.1.0-alpha.1). Most applications want
LoomEditor.WinUI, which brings this package and the others.
What it is
Draws the viewport of a ViewModel on an IRenderSurface. It is portable (net11.0) and knows only IRenderSurface; the Win2D backend lives in LoomEditor.WinUI. It knows nothing
about XAML controls: the LoomEditor control in LoomEditor.WinUI owns the canvas, the timer and the focus.
What is here (phase 2)
TextViewRenderer(+.Gutter.cs): draws only the visible lines at the scroll position (offsets are computed inintrelative to the viewport, see ADR 0005), then the selection, the current line highlight, the caret, and the gutter with the line numbers. It reports the widest line it drew toViewLayout.SetMaxLineWidth.OnFontChangedswaps the measurer and clears the cache after a font, tab size or DPI change.LineLayoutCache: least-recently-used cache of line layouts, keyed by the text of the line.ITextMeasurer,ILineLayout,IRenderSurface: what the renderer needs from a backend.LoomEditor.WinUI/Rendering/Win2D/implements them with DirectWrite (Win2DTextMeasurer,Win2DLineLayout,Win2DRenderSurface); the tests use fakes.CursorBlinking,TextEditorCursorBlinkingStyle: the caret blinking state machine. It has no timer; the control ticks it.OverflowLabel: the "Show more" label of lines longer than 10,000 characters.RenderLineHighlight: which parts of the current line are highlighted.
Rules
- Lines are laid out by DirectWrite; nothing assumes a fixed character width.
- Everything here runs on the UI thread. The classes say so in their
<remarks>.
Monaco sources: src/vs/editor/browser/viewParts/ (viewLines, lineNumbers, currentLineHighlight,
viewCursors). The Monaco → LoomEditor map is in docs/PORTING.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- LoomEditor.View (>= 0.5.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on LoomEditor.Rendering:
| Package | Downloads |
|---|---|
|
LoomEditor.WinUI
LoomEditor: a native, Native AOT-compatible code editor control for WinUI 3, ported from the Monaco editor. |
|
|
LoomEditor.Avalonia
LoomEditor: a native, Native AOT-compatible code editor control for Avalonia, ported from the Monaco editor. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.0 | 553 | 11/13/2026 |
| 0.6.0 | 487 | 11/10/2026 |
| 0.5.0 | 924 | 11/5/2026 |
| 0.4.0 | 175 | 11/2/2026 |
| 0.3.0 | 267 | 11/2/2026 |
| 0.2.0-alpha.5 | 101 | 10/30/2026 |
| 0.2.0-alpha.4 | 70 | 10/30/2026 |
| 0.2.0-alpha.3 | 72 | 10/30/2026 |
| 0.2.0-alpha.2 | 70 | 10/30/2026 |
| 0.2.0-alpha.1 | 66 | 10/30/2026 |
| 0.1.0-alpha.1 | 76 | 10/30/2026 |