You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-11Lines changed: 59 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,27 +14,74 @@ SixLabors.ImageSharp.Drawing
14
14
15
15
</div>
16
16
17
-
**ImageSharp.Drawing** is a cross-platform 2D drawing library built on top of [ImageSharp](https://github.com/SixLabors/ImageSharp). It provides path construction, polygon manipulation, fills, strokes, gradient brushes, pattern brushes, and text rendering. Built against [.NET 8](https://docs.microsoft.com/en-us/dotnet/standard/net-standard).
17
+
**ImageSharp.Drawing** is a cross-platform 2D drawing library built on top of [ImageSharp](https://github.com/SixLabors/ImageSharp). It adds a rich vector drawing model for composing raster images, rendering text, shaping paths, masking image-processing operations, and targeting CPU or WebGPU-backed drawing surfaces from the same `DrawingCanvas` API.
18
+
19
+
The core package targets .NET 8 and provides the default CPU backend. The optional `SixLabors.ImageSharp.Drawing.WebGPU` package adds GPU-backed rendering for native windows, external surfaces, and offscreen render targets.
20
+
21
+
## Capabilities
22
+
23
+
- Draw and fill paths, lines, arcs, ellipses, pies, rectangles, rounded rectangles, regular polygons, stars, and arbitrary `PathBuilder` geometry.
24
+
- Use solid, pattern, image, recolor, linear gradient, radial gradient, elliptic gradient, sweep gradient, and path gradient brushes.
25
+
- Stroke paths and polylines with configurable width, caps, joins, dash patterns, and stroke options.
26
+
- Render text with `SixLabors.Fonts`, including rich text runs, fallback fonts, bidirectional text, vertical layout, glyph paths, text measurement, wrapped text, and text-on-path scenarios.
27
+
- Compose with transforms, clipping, save/restore state, isolated layers, blend options, opacity, and region canvases.
28
+
- Use paths as masks for ImageSharp processors with `canvas.Apply(...)`, or fill paths with images via `ImageBrush`.
29
+
- Create retained drawing scenes and render them repeatedly to compatible targets.
30
+
- Render into `Image<TPixel>` memory with the CPU backend, or into WebGPU windows, external host surfaces, and offscreen render targets with the WebGPU backend.
18
31
19
32
## Quick Start
20
33
34
+
Draw into an `Image<TPixel>` with the CPU backend:
35
+
21
36
```csharp
22
37
image.Mutate(ctx=>ctx.Paint(canvas=>
23
38
{
39
+
// A fill without geometry paints the entire canvas.
- ImageSharp.Drawing is licensed under the [Six Labors Split License, Version 1.0](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/LICENSE)
78
+
79
+
- ImageSharp.Drawing is licensed under the [Six Labors Split License, Version 1.0](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/LICENSE)
33
80
34
81
35
82
## Support Six Labors
36
83
37
-
Support the efforts of the development of the Six Labors projects.
84
+
Support the efforts of the development of the Six Labors projects.
38
85
-[Purchase a Commercial License :heart:](https://sixlabors.com/pricing/)
39
86
-[Become a sponsor via GitHub Sponsors :heart:](https://github.com/sponsors/SixLabors)
40
87
-[Become a sponsor via Open Collective :heart:](https://opencollective.com/sixlabors)
@@ -49,17 +96,18 @@ Support the efforts of the development of the Six Labors projects.
49
96
- Do you have questions? We are happy to help! Please [join our Discussions Forum](https://github.com/SixLabors/ImageSharp.Drawing/discussions/category_choices), or ask them on [stackoverflow](https://stackoverflow.com) using the `ImageSharp` tag. **Do not** open issues for questions!
50
97
- Please read our [Contribution Guide](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/.github/CONTRIBUTING.md) before opening issues or pull requests!
51
98
52
-
## Code of Conduct
99
+
## Code of Conduct
53
100
This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/) to clarify expected behavior in our community.
54
101
For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
55
102
56
103
## Installation
57
104
58
105
Install stable releases via NuGet; development releases are available via MyGet.
59
106
60
-
| Package Name | Release (NuGet) | Nightly (MyGet) |
0 commit comments