CodeBrix.PolygonTools.MitLicenseForever 1.0.290.843

dotnet add package CodeBrix.PolygonTools.MitLicenseForever --version 1.0.290.843
                    
NuGet\Install-Package CodeBrix.PolygonTools.MitLicenseForever -Version 1.0.290.843
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CodeBrix.PolygonTools.MitLicenseForever" Version="1.0.290.843" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeBrix.PolygonTools.MitLicenseForever" Version="1.0.290.843" />
                    
Directory.Packages.props
<PackageReference Include="CodeBrix.PolygonTools.MitLicenseForever" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CodeBrix.PolygonTools.MitLicenseForever --version 1.0.290.843
                    
#r "nuget: CodeBrix.PolygonTools.MitLicenseForever, 1.0.290.843"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CodeBrix.PolygonTools.MitLicenseForever@1.0.290.843
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CodeBrix.PolygonTools.MitLicenseForever&version=1.0.290.843
                    
Install as a Cake Addin
#tool nuget:?package=CodeBrix.PolygonTools.MitLicenseForever&version=1.0.290.843
                    
Install as a Cake Tool

CodeBrix.PolygonTools

A fully managed, cross-platform 2D polygon clipping and offsetting library for .NET. CodeBrix.PolygonTools performs the four boolean set operations - intersection, union, difference and exclusive-or - on arbitrary sets of polygons and open paths, and inflates or deflates polygons with miter, round or square joins. It operates on 64-bit integer coordinates so that its arithmetic is exact and its results are robust, and it correctly handles self-intersecting polygons, holes, and polygons with coincident or collinear edges. CodeBrix.PolygonTools has no dependencies other than .NET, and is provided as a .NET 10 library and associated CodeBrix.PolygonTools.MitLicenseForever NuGet package.

CodeBrix.PolygonTools supports applications and assemblies that target Microsoft .NET version 10.0 and later. Microsoft .NET version 10.0 is a Long-Term Supported (LTS) version of .NET, and was released on Nov 11, 2025; and will be actively supported by Microsoft until Nov 14, 2028. Please update your C#/.NET code and projects to the latest LTS version of Microsoft .NET.

Installation

dotnet add package CodeBrix.PolygonTools.MitLicenseForever

Note that the NuGet package ID and the namespace are different - there is no package named plain CodeBrix.PolygonTools:

  • NuGet package ID: CodeBrix.PolygonTools.MitLicenseForever
  • Assembly and primary namespace: CodeBrix.PolygonTools - i.e. using CodeBrix.PolygonTools;

XML documentation (IntelliSense) ships alongside the assembly.

The package has no NuGet dependencies at all - nothing beyond .NET itself is pulled in.

CodeBrix.PolygonTools supports:

  • All four boolean clipping operations on sets of polygons - intersection, union, difference and exclusive-or
  • Four filling rules - even-odd, non-zero, positive and negative - so the library interoperates with GDI+, Cairo, OpenGL, SVG and similar rendering models
  • Polygon offsetting (inflating and deflating) with miter, round and square joins, and butt, square or round line ends
  • Open-path (polyline) clipping as well as closed-polygon clipping
  • Self-intersecting polygons, holes, and polygons with coincident or collinear edges
  • Results returned either as a flat list of paths or as a PolyTree that preserves the parent/child nesting of outer polygons and their holes
  • Supporting operations including SimplifyPolygon, CleanPolygon, Orientation, Area, PointInPolygon, MinkowskiSum and MinkowskiDiff
  • Exact 64-bit integer arithmetic, with no floating-point rounding artifacts in the clipping result

Sample Code

Union of two overlapping squares

using System.Collections.Generic;
using CodeBrix.PolygonTools;
using CodeBrix.PolygonTools.Enumerations;
using CodeBrix.PolygonTools.Models;

var subject = new List<IntPoint>
{
    new IntPoint(0, 0), new IntPoint(100, 0), new IntPoint(100, 100), new IntPoint(0, 100)
};

var clip = new List<IntPoint>
{
    new IntPoint(50, 50), new IntPoint(150, 50), new IntPoint(150, 150), new IntPoint(50, 150)
};

var solution = new List<List<IntPoint>>();

var polyClip = new PolyClip();
polyClip.AddPath(subject, PolyType.ptSubject, true);
polyClip.AddPath(clip, PolyType.ptClip, true);
polyClip.Execute(ClipType.ctUnion, solution, PolyFillType.pftNonZero, PolyFillType.pftNonZero);

//solution now holds the single L-shaped polygon covering both squares

Growing a polygon by 10 units

using System.Collections.Generic;
using CodeBrix.PolygonTools;
using CodeBrix.PolygonTools.Enumerations;
using CodeBrix.PolygonTools.Models;

//subject is the List<IntPoint> square from the previous example
var offset = new PolyClipOffset();
offset.AddPath(subject, JoinType.jtMiter, EndType.etClosedPolygon);

var inflated = new List<List<IntPoint>>();
offset.Execute(ref inflated, 10.0);

//pass a negative delta to Execute in order to shrink the polygon instead

Documentation

The NuGet package includes AGENT-README.txt, a complete API reference and usage guide written for AI coding agents - point your agent at that file when it is writing code against this library.

Additional sample code and usage examples are available in the CodeBrix.PolygonTools.Tests project: https://github.com/ellisnet/CodeBrix.PolygonTools/tree/main/tests/CodeBrix.PolygonTools.Tests

License

CodeBrix.PolygonTools is licensed under the MIT License, and portions of it remain subject to the Boost Software License 1.0 - see the LICENSE file, which carries both notices, and license-boost.txt for the full Boost licence text.

For licensing and provenance information about the open source code included in this package, see THIRD-PARTY-NOTICES.txt.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on CodeBrix.PolygonTools.MitLicenseForever:

Package Downloads
CodeBrix.Imaging.Drawing.ApacheLicenseForever

A stroke-based drawing, painting, and highlighting library that requires SkiaSharp. It captures pointer input as calibrated strokes on named, colored layers, and composites them over an image - or over live content such as a video feed - with a translucent highlighter effect, then exports the result as PNG or JPEG. If you can't or don't want a native SkiaSharp dependency, use the fully managed CodeBrix.Imaging.Drawing.NoSkia package instead; both offer the same API. Never reference both packages in the same project - they define the same types under the same namespace and will conflict.

CodeBrix.Imaging.Drawing.NoSkia.ApacheLicenseForever

A fully managed 2D drawing library with no native dependencies of any kind - everything renders in pure managed code. Provides the same drawing, painting, and highlighting API as CodeBrix.Imaging.Drawing, plus SVG rendering, working directly on in-memory pixel data. Use this instead of CodeBrix.Imaging.Drawing when you can't or don't want to bring in SkiaSharp or any other native graphics library. Never reference both packages in the same project - they define the same types under the same namespace and will conflict.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.290.843 128 10/17/2026
1.0.252.1257 224 9/9/2026
1.0.242.1181 121 8/30/2026
1.0.200.1267 139 7/19/2026