Skip to content

Commit ebf73b1

Browse files
DrawingCanvas API: Replace imperative extension methods with stateful canvas-based drawing model (#377)
* Migrate SolidBrush tests * Migrate SweetGradientBrush tests * Migrate RecolorBrush tests * Migrate SolidBezier tests * Migrate Blending tests * Migrate Clip tests * Migrate robustness tests * Migrate Issues tests * Migrate SVGPath tests * Cleanup references * Optimize refs * Remove legacy APIs * Fix build * Update ImageSharp.Drawing.sln * Include binaries use streaming for composition * Update ImageSharp.Drawing.Tests.csproj * Use tolerance comparer * Update DrawingCanvasTests.RegionAndState.cs * Skip WebGPU drawing tests on Linux * Skip WebGPU tests for all CI * Remove rasterizer config * Replace PolygonScanner with DefaultRasterizer and optimize * Feng shui all the things. * Remove unused type * Reuse WorkerScratch across rasterizer calls + optimizations * Fix tile mapping and dispatch dimensions * Use output texture for readback to avoid copy * Add CSR shaders; restructure WebGPU shaders & tests * Switch to CSR-based composite shaders * Add start_cover fast path; skip outside edges * Compute CSR on CPU; refactor coverage rasterizer * Update DrawingCanvasTests.Process.cs * Switch edge buffers to IMemoryOwner * Pre-split edges into band-sorted buffers (remove CSR) * Add small-geometry fast path to rasterizer * Update reference images * Update Draw_NormalizeOutputFalse_MatchesReference_Rgba32.png * Bump tolerance * Fix #344 * Fix #367 * Fix #244 * Add AntialiasThreshold and aliased mode * Remove FillPath API from drawing backends * Add WebGPUWindowDemo and backend feature checks * Make API public * Remove NormalizeOutput * Move stroking to the GPU * Add GPU stroke expand shader & refactor strokes * Add per-band stroke rasterization and StrokeEdgeFlags * Update docs * Update reference images * GPU: add gradient, pattern & recolor brushes * Replace DashPathSplitter with GenerateDashes extension * Add ReleaseFrameResources and WebGPU CPU cache key * Add new text measuring tests * Migrate drawing transforms to Matrix4x4 * Attempt to run WebGPU tests in CI * Use explicit theory with runtime support check * Update build-and-test.yml * Cache WebGPU support and gate drawing backend * Use PNG for comparison * Update WebGPUDrawingBackendTests.cs * Remove duplicate assertion * Verify WebGPU compute pipeline in ProbeSupport * Add RemoteExecutor and WebGPU probe * Add missing tests. * Add GPU layer compositing and shared WGSL snippets * Remove reference codecs and simplify tests * Add pre-flattened paths and FlattenAndTransform helper * Optimize Bezier subdivision and list allocation * Use IMemoryOwner for edge and band offset buffers * Cleanup * Use auto-properties; drop isRoot flag * Add no AA rectangle tests * Remove some copying. * Update dependencies * Refactor path flattening and remove tessellation * Handle different separators in SVG parsing * Cache flattening properly. * Refactor CPU to actually follow architecture * Refactor composition preparation and batching * Fix orientation, update ref output * Update refs * semi-reasonable performance * Update FlushScene.cs * Remove GeometryPreparationCache and cache bands * Remove obsolete enforceFillOrientation flag * Remove enforceFillOrientation; simplify Reverse * Reimplement all GPU brushes * Support per-draw blend mode and alpha in WebGPU * Extract DeviceSharedState to WebGPURuntime * Add inline layer support to compositing pipeline * Refactor brush renderers and FlushScene parallel loop * Refactor WebGPU encoder and linearize path model * Cleanup and document * Treat TargetFramework as local in csproj * Pass layer bounds and refactor rasterizer spans * Buffer contiguous spans to batch row callbacks * Apply DestinationOffset for path point translation * Add aliased fine-pass threshold shader and plumbing * Move WGSL sources to Shaders/WgslSource * Add 3rd part notices * Add WebGPU scene support & optimize encoding * Add docs and helpers for WebGPU shaders & backend * Add sample; add WebGPU chunking. * Use CI solution in scripts; tweak sample csproj * Update refs * Update WgslSourceGenerator.cs * Add tolerance * Update ci-test.ps1 * Update docs. * add Skia "benchmark backend" options to DrawingBackendBenchmark * tmp - progress capture only * Improve GPU perf * Fix chunking * cleanup * Cache and reuse scheduling arena across flushes * Add reusable WebGPU scene resource arena * Refactor scheduling & resource arena helpers * Remove debug logging * Add slowpath transform * Apply transforms * Fix gradient brushes * Fix GPU stroking and ImageBrush * Fix GPU brush transforms * Test pass. * Implement retained stroke rasterization and stroke commands * Clean up public API * Centralize WebGPU probes into WebGPURuntime * Patch test, update docs * Honor MaxDegreeOfParallelism in flush * Add Fill symmetry, new Pie polygon, and migrate to extensions * Simplify tests and update docs * detangle build version numbers * Add PathBuilder shape helpers; normalize angles to degrees * Fix tests * Add ParallelExecutionHelper for partitioning * Update refs * Update ImageSharp ref * Cleanup API and fix demo FPS display * Inline explicit layers; remove compose pass, fix issues * Include square line cap in bounds; update WebGPU tests * Improve coverage a little * Add emoji grid text rendering test and bump Fonts * Fix parallel bounds, use configuration * Replace Lease-based runtime with shared API * Remove HybridCanvasFrame and hybrid APIs * Replace TryReadback API with Readback methods, remove Shutdown * benchmark parallel efficiency and overhead * Introduce safe WebGPU handle wrappers * Use WebGPUEnvironmentError for probe results * Use error codes in test attributes. * Make ToLinearGeometry() cache threadsafe. * Merge -> Concat * Use inline array, fix GPU retry counter logic * Update src/ImageSharp.Drawing/Processing/Backends/DefaultDrawingBackend.cs Co-authored-by: Anton Firszov <antonfir@gmail.com> * Update src/ImageSharp.Drawing/Processing/Backends/ParallelExecutionHelper.cs Co-authored-by: Anton Firszov <antonfir@gmail.com> * Update ParallelExecutionHelper.cs * ProcessWithCanvas -> Paint * Process -> Apply * Add useful scripts. * restructure solutions and fix DrawShapesWithImageSharp sample * make the lines benchmark resizable * Refactor WebGPU handles and render targets * Use safe handle refs for WebGPU native calls via using * Use DrawingOptions in composition and stroke commands * Fix tests * Update WebGPU docs. * Align chunk tile heights to 16-row bins * Add more efficient path-row shaders and sparse tile handling * Fix benchmark resize handling * Add hosted window API and samples + fix bugs/perf * Remove overly defensive guards * Make CloneForClearOperation internal * Use IEnumerable for DrawGlyphs * Unify text measurement API to TextMetrics * Remove InnerJoin config, ensure WebGPU configuration coverage * Remove WebGPUTextureTransfer and use Readback APIs * Remove partial modifier from DrawingCanvas * Rename DrawingCanvasExtensions class * Full cleanup pass * Use WebGPUHostedSurface and normalize API * Treat DeviceLost a non-fatal until it is. * Refactor WebGPU resource allocation to throw * Replace TryReadRegion with ReadRegion (throws) * Add Apply readback scene and UI wiring * Make NativeSurface abstract, simplify, and add WebGPU surface * Make types internal * Add WebGPU path-gradient support and remove fallback behavior * Move canvas convenience APIs to extensions * Normalize stroke docs. * Update TextBuilderTests.cs * Update PathTests.cs * More Path extensions tests * Add FillPath_UncontainedGeometry WebGPU test * Handle point strokes in WebGPU encoder * Use Allocator/IMemoryOwner instead of ArrayPool * Use WebGPUNativeTarget and refactor native surface * Rename HostedSurface to ExternalSurface * Remove FramebufferSize from WebGPUSurfaceFrame * Remove Present method; auto-present on Dispose * Make presentMode readonly; remove properties * Introduce DrawingCanvas base type and APIs * Introduce FlattenedPointBuilder and rendering optimizations * Add rich drawing samples and assets. Fix SaveLayer clipping * Clean up images that shouldn't be there. * Tweak sample * Add files to LFS * Dispose Canvas then ensure surface handle release * Make DrawingCanvas factory internal and update tests * ImageSharp.Drawing.All * simplify CompositePixelRegistration storage and related lookup methods * fix xmldoc leftover * delete unused code * Add retained drawing scenes and refactor WebGPU * Remove TPixel generics from WebGPU API * Refactor drawing backend API and WebGPU helpers * Add partitioned parallel encoding for WebGPU scenes * Add WebGPU uncaptured-error handling and safety * Add retain regression tests * Remove TryGetOrCreateSharedBuffer * Refactor WebGPU buffer creation helpers to remove Try * delete unused code * delete more dead code * Rename Graphics to DeviceContext and make field * Remove WebGPUNativeSurfaceFactory * Add ReadbackImage API and Buffer2DRegion usage * Migrate Create to WebGPUNativeSurface * Use native frames for WebGPU staging and flush * Fix binning regression. * Align GPU ImageBrush with CPU * Convert shape extensions to DrawingCanvas methods * Use explicit native mappings instead of casts * Refactor WebGPU native surface and chunking * Add WebGPU environment options and preference * Update tolerances * Trim test output name length * Make diagnostics internal; drop int encodings, cleanup * Update tests/ImageSharp.Drawing.Tests/Processing/Backends/WebGPUDrawingBackendTests.cs Co-authored-by: Anton Firszov <antonfir@gmail.com> * Remove unused docs * Update to latest Fonts and add APIs, tests and samples * Update the sample to allow general closed paths * Optimize scenes, tweak docs. * Support continuous and on-demand rendering in samples --------- Co-authored-by: antonfirsov <antonfir@gmail.com>
1 parent 6d2010b commit ebf73b1

2,508 files changed

Lines changed: 72394 additions & 40351 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ jobs:
9292
framework: net8.0
9393
sdk: 8.0.x
9494
runtime: -x64
95-
codecov: true
95+
codecov: false
9696
- os: macos-26
9797
framework: net8.0
9898
sdk: 8.0.x
9999
runtime: -x64
100-
codecov: false
100+
codecov: true
101101
- os: windows-latest
102102
framework: net8.0
103103
sdk: 8.0.x

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,7 @@ artifacts/
227227

228228
/tests/CodeCoverage/OpenCover.*
229229
SixLabors.Shapes.Coverage.xml
230-
/tests/SixLabors.Shapes.Benchmarks/BenchmarkDotNet.Artifacts/results/
230+
/tests/SixLabors.Shapes.Benchmarks/BenchmarkDotNet.Artifacts/results/
231+
.dotnet
232+
.codex-*
233+
.claude

ImageSharp.Drawing.All.sln

Lines changed: 523 additions & 0 deletions
Large diffs are not rendered by default.

ImageSharp.Drawing.sln

Lines changed: 107 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_root", "_root", "{C317F1B1
1717
Directory.Build.targets = Directory.Build.targets
1818
LICENSE = LICENSE
1919
README.md = README.md
20+
THIRD-PARTY-NOTICES = THIRD-PARTY-NOTICES
2021
EndProjectSection
2122
EndProject
2223
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1799C43E-5C54-4A8F-8D64-B1475241DB0D}"
@@ -323,42 +324,129 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Drawing.Benchmar
323324
EndProject
324325
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SharedInfrastructure", "shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.shproj", "{68A8CC40-6AED-4E96-B524-31B1158FDEEA}"
325326
EndProject
326-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{528610AC-7C0C-46E8-9A2D-D46FD92FEE29}"
327-
ProjectSection(SolutionItems) = preProject
328-
samples\Directory.Build.props = samples\Directory.Build.props
329-
samples\Directory.Build.targets = samples\Directory.Build.targets
330-
samples\Drawing.Samples.ruleset = samples\Drawing.Samples.ruleset
331-
EndProjectSection
332-
EndProject
333-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrawShapesWithImageSharp", "samples\DrawShapesWithImageSharp\DrawShapesWithImageSharp.csproj", "{5493F024-0A3F-420C-AC2D-05B77A36025B}"
334-
EndProject
335327
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{23859314-5693-4E6C-BE5C-80A433439D2A}"
336328
ProjectSection(SolutionItems) = preProject
337329
.github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
338330
EndProjectSection
339331
EndProject
332+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageSharp.Drawing.WebGPU", "src\ImageSharp.Drawing.WebGPU\ImageSharp.Drawing.WebGPU.csproj", "{061582C2-658F-40AE-A978-7D74A4EB2C0A}"
333+
EndProject
334+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageSharp.Drawing.WebGPU.ShaderGen", "src\ImageSharp.Drawing.WebGPU.ShaderGen\ImageSharp.Drawing.WebGPU.ShaderGen.csproj", "{C7606104-5D58-4670-912C-3F336606B02D}"
335+
EndProject
336+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageSharp.Drawing.ManualBenchmarks", "tests\ImageSharp.Drawing.ManualBenchmarks\ImageSharp.Drawing.ManualBenchmarks.csproj", "{70193989-E587-451A-AF34-4C74FEE5DA5A}"
337+
EndProject
338+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{CC2DDE4D-58D9-4333-BBEE-B4F36E0A4070}"
339+
EndProject
340+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebGPUWindowDemo", "samples\WebGPUWindowDemo\WebGPUWindowDemo.csproj", "{999D90DE-6940-4693-9F80-701F2D5DB77A}"
341+
EndProject
342+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawShapesWithImageSharp", "samples\DrawShapesWithImageSharp\DrawShapesWithImageSharp.csproj", "{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}"
343+
EndProject
340344
Global
341345
GlobalSection(SolutionConfigurationPlatforms) = preSolution
342346
Debug|Any CPU = Debug|Any CPU
347+
Debug|x64 = Debug|x64
348+
Debug|x86 = Debug|x86
343349
Release|Any CPU = Release|Any CPU
350+
Release|x64 = Release|x64
351+
Release|x86 = Release|x86
344352
EndGlobalSection
345353
GlobalSection(ProjectConfigurationPlatforms) = postSolution
346354
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
347355
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|Any CPU.Build.0 = Debug|Any CPU
356+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|x64.ActiveCfg = Debug|Any CPU
357+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|x64.Build.0 = Debug|Any CPU
358+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|x86.ActiveCfg = Debug|Any CPU
359+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Debug|x86.Build.0 = Debug|Any CPU
348360
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|Any CPU.ActiveCfg = Release|Any CPU
349361
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|Any CPU.Build.0 = Release|Any CPU
362+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x64.ActiveCfg = Release|Any CPU
363+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x64.Build.0 = Release|Any CPU
364+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x86.ActiveCfg = Release|Any CPU
365+
{2E33181E-6E28-4662-A801-E2E7DC206029}.Release|x86.Build.0 = Release|Any CPU
350366
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
351367
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
368+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|x64.ActiveCfg = Debug|Any CPU
369+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|x64.Build.0 = Debug|Any CPU
370+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|x86.ActiveCfg = Debug|Any CPU
371+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Debug|x86.Build.0 = Debug|Any CPU
352372
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
353373
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|Any CPU.Build.0 = Release|Any CPU
374+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|x64.ActiveCfg = Release|Any CPU
375+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|x64.Build.0 = Release|Any CPU
376+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|x86.ActiveCfg = Release|Any CPU
377+
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6}.Release|x86.Build.0 = Release|Any CPU
354378
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
355379
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|Any CPU.Build.0 = Debug|Any CPU
380+
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|x64.ActiveCfg = Debug|Any CPU
381+
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|x64.Build.0 = Debug|Any CPU
382+
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|x86.ActiveCfg = Debug|Any CPU
383+
{59804113-1DD4-4F80-8D06-35FF71652508}.Debug|x86.Build.0 = Debug|Any CPU
356384
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|Any CPU.ActiveCfg = Release|Any CPU
357385
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|Any CPU.Build.0 = Release|Any CPU
358-
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
359-
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Debug|Any CPU.Build.0 = Debug|Any CPU
360-
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Release|Any CPU.ActiveCfg = Release|Any CPU
361-
{5493F024-0A3F-420C-AC2D-05B77A36025B}.Release|Any CPU.Build.0 = Release|Any CPU
386+
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|x64.ActiveCfg = Release|Any CPU
387+
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|x64.Build.0 = Release|Any CPU
388+
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|x86.ActiveCfg = Release|Any CPU
389+
{59804113-1DD4-4F80-8D06-35FF71652508}.Release|x86.Build.0 = Release|Any CPU
390+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
391+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
392+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|x64.ActiveCfg = Debug|Any CPU
393+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|x64.Build.0 = Debug|Any CPU
394+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|x86.ActiveCfg = Debug|Any CPU
395+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Debug|x86.Build.0 = Debug|Any CPU
396+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
397+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|Any CPU.Build.0 = Release|Any CPU
398+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|x64.ActiveCfg = Release|Any CPU
399+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|x64.Build.0 = Release|Any CPU
400+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|x86.ActiveCfg = Release|Any CPU
401+
{061582C2-658F-40AE-A978-7D74A4EB2C0A}.Release|x86.Build.0 = Release|Any CPU
402+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
403+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|Any CPU.Build.0 = Debug|Any CPU
404+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|x64.ActiveCfg = Debug|Any CPU
405+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|x64.Build.0 = Debug|Any CPU
406+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|x86.ActiveCfg = Debug|Any CPU
407+
{C7606104-5D58-4670-912C-3F336606B02D}.Debug|x86.Build.0 = Debug|Any CPU
408+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|Any CPU.ActiveCfg = Release|Any CPU
409+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|Any CPU.Build.0 = Release|Any CPU
410+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|x64.ActiveCfg = Release|Any CPU
411+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|x64.Build.0 = Release|Any CPU
412+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|x86.ActiveCfg = Release|Any CPU
413+
{C7606104-5D58-4670-912C-3F336606B02D}.Release|x86.Build.0 = Release|Any CPU
414+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
415+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
416+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|x64.ActiveCfg = Debug|Any CPU
417+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|x64.Build.0 = Debug|Any CPU
418+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|x86.ActiveCfg = Debug|Any CPU
419+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Debug|x86.Build.0 = Debug|Any CPU
420+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
421+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|Any CPU.Build.0 = Release|Any CPU
422+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|x64.ActiveCfg = Release|Any CPU
423+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|x64.Build.0 = Release|Any CPU
424+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|x86.ActiveCfg = Release|Any CPU
425+
{70193989-E587-451A-AF34-4C74FEE5DA5A}.Release|x86.Build.0 = Release|Any CPU
426+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
427+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|Any CPU.Build.0 = Debug|Any CPU
428+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|x64.ActiveCfg = Debug|Any CPU
429+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|x64.Build.0 = Debug|Any CPU
430+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|x86.ActiveCfg = Debug|Any CPU
431+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Debug|x86.Build.0 = Debug|Any CPU
432+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|Any CPU.ActiveCfg = Release|Any CPU
433+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|Any CPU.Build.0 = Release|Any CPU
434+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|x64.ActiveCfg = Release|Any CPU
435+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|x64.Build.0 = Release|Any CPU
436+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|x86.ActiveCfg = Release|Any CPU
437+
{999D90DE-6940-4693-9F80-701F2D5DB77A}.Release|x86.Build.0 = Release|Any CPU
438+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
439+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
440+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|x64.ActiveCfg = Debug|Any CPU
441+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|x64.Build.0 = Debug|Any CPU
442+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|x86.ActiveCfg = Debug|Any CPU
443+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Debug|x86.Build.0 = Debug|Any CPU
444+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
445+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|Any CPU.Build.0 = Release|Any CPU
446+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|x64.ActiveCfg = Release|Any CPU
447+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|x64.Build.0 = Release|Any CPU
448+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|x86.ActiveCfg = Release|Any CPU
449+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7}.Release|x86.Build.0 = Release|Any CPU
362450
EndGlobalSection
363451
GlobalSection(SolutionProperties) = preSolution
364452
HideSolutionNode = FALSE
@@ -384,13 +472,18 @@ Global
384472
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
385473
{59804113-1DD4-4F80-8D06-35FF71652508} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
386474
{68A8CC40-6AED-4E96-B524-31B1158FDEEA} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
387-
{5493F024-0A3F-420C-AC2D-05B77A36025B} = {528610AC-7C0C-46E8-9A2D-D46FD92FEE29}
388475
{23859314-5693-4E6C-BE5C-80A433439D2A} = {1799C43E-5C54-4A8F-8D64-B1475241DB0D}
476+
{061582C2-658F-40AE-A978-7D74A4EB2C0A} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
477+
{C7606104-5D58-4670-912C-3F336606B02D} = {815C0625-CD3D-440F-9F80-2D83856AB7AE}
478+
{70193989-E587-451A-AF34-4C74FEE5DA5A} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
479+
{999D90DE-6940-4693-9F80-701F2D5DB77A} = {CC2DDE4D-58D9-4333-BBEE-B4F36E0A4070}
480+
{43A3CA46-2675-4AD4-88FC-DDC2E657F0B7} = {CC2DDE4D-58D9-4333-BBEE-B4F36E0A4070}
389481
EndGlobalSection
390482
GlobalSection(ExtensibilityGlobals) = postSolution
391483
SolutionGuid = {5F8B9D1F-CD8B-4CC5-8216-D531E25BD795}
392484
EndGlobalSection
393485
GlobalSection(SharedMSBuildProjectFiles) = preSolution
486+
shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{061582c2-658f-40ae-a978-7d74a4eb2c0a}*SharedItemsImports = 5
394487
shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{2e33181e-6e28-4662-a801-e2e7dc206029}*SharedItemsImports = 5
395488
shared-infrastructure\src\SharedInfrastructure\SharedInfrastructure.projitems*{68a8cc40-6aed-4e96-b524-31b1158fdeea}*SharedItemsImports = 13
396489
EndGlobalSection

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,21 @@ SixLabors.ImageSharp.Drawing
1111
[![Build Status](https://img.shields.io/github/actions/workflow/status/SixLabors/ImageSharp.Drawing/build-and-test.yml?branch=main)](https://github.com/SixLabors/ImageSharp.Drawing/actions)
1212
[![Code coverage](https://codecov.io/gh/SixLabors/ImageSharp.Drawing/branch/main/graph/badge.svg)](https://codecov.io/gh/SixLabors/ImageSharp.Drawing)
1313
[![License: Six Labors Split](https://img.shields.io/badge/license-Six%20Labors%20Split-%23e30183)](https://github.com/SixLabors/ImageSharp.Drawing/blob/main/LICENSE)
14-
[![Twitter](https://img.shields.io/twitter/url/http/shields.io.svg?style=flat&logo=twitter)](https://twitter.com/intent/tweet?hashtags=imagesharp,dotnet,oss&text=ImageSharp.+A+new+cross-platform+2D+graphics+API+in+C%23&url=https%3a%2f%2fgithub.com%2fSixLabors%2fImageSharp&via=sixlabors)
1514

1615
</div>
1716

18-
### **ImageSharp.Drawing** provides extensions to ImageSharp containing powerful, cross-platform 2D polygon manipulation and drawing APIs.
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).
1918

20-
Designed to democratize image processing, ImageSharp.Drawing brings you an incredibly powerful yet beautifully simple API.
19+
## Quick Start
2120

22-
Built against [.NET 6](https://docs.microsoft.com/en-us/dotnet/standard/net-standard), ImageSharp.Drawing can be used in device, cloud, and embedded/IoT scenarios.
21+
```csharp
22+
image.Mutate(ctx => ctx.Paint(canvas =>
23+
{
24+
canvas.Fill(Brushes.Solid(Color.White));
25+
canvas.Fill(Brushes.Solid(Color.Red), new EllipsePolygon(200, 200, 100));
26+
canvas.Draw(Pens.Solid(Color.Blue, 3F), new RectangularPolygon(50, 50, 200, 100));
27+
}));
28+
```
2329

2430
## License
2531

@@ -61,12 +67,12 @@ If you prefer, you can compile ImageSharp.Drawing yourself (please do and help!)
6167

6268
- Using [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
6369
- Make sure you have the latest version installed
64-
- Make sure you have [the .NET 7 SDK](https://www.microsoft.com/net/core#windows) installed
70+
- Make sure you have [the .NET 8 SDK](https://www.microsoft.com/net/core#windows) installed
6571

6672
Alternatively, you can work from command line and/or with a lightweight editor on **both Linux/Unix and Windows**:
6773

6874
- [Visual Studio Code](https://code.visualstudio.com/) with [C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
69-
- [the .NET 7 SDK](https://www.microsoft.com/net/core#linuxubuntu)
75+
- [the .NET 8 SDK](https://www.microsoft.com/net/core#linuxubuntu)
7076

7177
To clone ImageSharp.Drawing locally, click the "Clone in [YOUR_OS]" button above or run the following git commands:
7278

THIRD-PARTY-NOTICES

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
SixLabors.ImageSharp.Drawing uses or incorporates ideas, algorithms, and/or
2+
implementation guidance from third-party projects that are distributed under
3+
licenses different from the Six Labors ImageSharp.Drawing software.
4+
5+
The attached notices are provided for informational purposes only. Please
6+
review the original project repositories and license files for complete terms.
7+
8+
================================================================================
9+
10+
Blaze (https://github.com/aurimasg/blaze)
11+
License: MIT
12+
13+
Portions of this software were developed with reference to the Blaze
14+
project, including rasterization and related implementation techniques.
15+
See also: src/ImageSharp.Drawing/Processing/Backends/DEFAULT_RASTERIZER.MD
16+
17+
Copyright (c) 2023 Aurimas Gasiulis
18+
19+
The Blaze project is distributed under the MIT License. The full license text
20+
is available in the Blaze repository LICENSE file.
21+
22+
================================================================================
23+
24+
Vello (https://github.com/linebender/vello)
25+
License: Apache-2.0 OR MIT
26+
27+
Portions of this software were developed with reference to the Vello project,
28+
including GPU rasterization pipeline structure, shader stages, and related
29+
implementation techniques.
30+
See also:
31+
- src/ImageSharp.Drawing.WebGPU/WEBGPU_BACKEND.md
32+
- src/ImageSharp.Drawing.WebGPU/WEBGPU_RASTERIZER.md
33+
34+
Copyright 2020 the Vello Authors
35+
36+
The Vello project is distributed under the Apache License, Version 2.0, or the
37+
MIT License. The full license texts are available in the Vello repository
38+
LICENSE-APACHE and LICENSE-MIT files.
39+
40+
================================================================================

0 commit comments

Comments
 (0)