PeachDrawing.Core

PeachDrawing.Core.Geometry

PathOperations Class

Combines filled shapes into new ones. The result keeps the true curves of its inputs: lines stay lines and cubic Béziers stay cubic Béziers (cut where the shapes cross), rather than becoming a flattened polygon.

public static class PathOperations

Inheritance System.Object → PathOperations

Methods  
Combine(GraphicsPath, GraphicsPath, PathOperation, GraphicsPath) Adds to destination the outline of the area produced by combining two shapes. Each input is read as a filled area under its own FillMode, with every subpath treated as closed, so an input may have holes and may cross itself. The result is one or more closed subpaths, and destination is set to Nonzero: outer boundaries and holes wind in opposite directions, so filling it reproduces the combined area.