SharpAstro.Vector
3.36.1911
See the version list below for details.
dotnet add package SharpAstro.Vector --version 3.36.1911
NuGet\Install-Package SharpAstro.Vector -Version 3.36.1911
<PackageReference Include="SharpAstro.Vector" Version="3.36.1911" />
<PackageVersion Include="SharpAstro.Vector" Version="3.36.1911" />
<PackageReference Include="SharpAstro.Vector" />
paket add SharpAstro.Vector --version 3.36.1911
#r "nuget: SharpAstro.Vector, 3.36.1911"
#:package SharpAstro.Vector@3.36.1911
#addin nuget:?package=SharpAstro.Vector&version=3.36.1911
#tool nuget:?package=SharpAstro.Vector&version=3.36.1911
SharpAstro.Vector
A format-neutral vector scene for .NET, with no dependencies. The namespace is SharpAstro.VectorGraphics
(not SharpAstro.Vector, which would hide System.Numerics.Vector from any consumer in a SharpAstro.* namespace).
VectorScene: nodes in painting order, in a y-down coordinate system of a given width and height.VectorShape: aVectorPathwith a transform, an optionalVectorFilland an optionalVectorStroke.VectorGroup: children that must be drawn into one layer and blended at an opacity.VectorPath/PathBuilder/IPathSink: absolute move, line, quad, cubic and close.SolidPaint,LinearGradientPaint,RadialGradientPaint(two circles): what a fill or stroke paints with. A gradient carries its stops, its extend mode and a transform from gradient space to the shape's coordinates.Rgba32: an sRGB colour, 8 bits a channel, alpha not premultiplied.
VectorSceneFile.Write / Read turn a scene into bytes and back: a binary form that loads 15 to 50 times faster than
an SVG is read. It is a bake and cache format, not an interchange format, and it is not reliably smaller than the SVG.
There is no rasteriser and no font code here. A reader such as SharpAstro.Svg produces a scene; the caller
draws it with whatever renderer it has, by replaying each path into its own IPathSink.
foreach (VectorNode node in scene.Nodes)
{
if (node is VectorShape shape)
{
shape.Path.Replay(mySink); // geometry, in the shape's local units
// shape.Transform, shape.Fill, shape.Stroke say how to paint it
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SharpAstro.Vector:
| Package | Downloads |
|---|---|
|
SharpAstro.Fonts
Pure-managed, MIT-licensed C# OpenType / TrueType font loader and rasterizer. |
|
|
SharpAstro.Svg
Pure C# SVG reader for .NET that resolves a document into a SharpAstro.Vector scene (paths, fills, strokes, transforms, opacity groups) and leaves drawing to the caller: no rasteriser, no font code, not a pixel decoder. Written from the W3C SVG specifications. Reads paths, basic shapes, transforms, viewports, use and symbol, solid and gradient paints, stroke properties and style sheets, and reports everything it does not read. |
GitHub repositories
This package is not used by any popular GitHub repositories.