SVGGeometryElement.Combine

SVGGeometryElement.Combine method

Combines this geometry with another SVG geometry using a boolean operation, and returns a new <path> element containing the result.

public SVGPathElement Combine(SVGGeometryElement geometryElement, BooleanPathOp op)
ParameterTypeDescription
geometryElementSVGGeometryElementThe other geometry to combine with. Must be in the same document.
opBooleanPathOpThe boolean operator to apply: Union (A UNION B), Difference (A - B), Intersection (A INTERSECT B), or Exclusion (XOR).

Return Value

A new SVGPathElement whose d attribute encodes the result in root <svg> user space (CSS px). The element is not appended to the DOM.

Exceptions

exceptioncondition
ArgumentNullExceptionThrown if geometryElement is null.
InvalidOperationExceptionThrown if this element has no owner document.
NotSupportedExceptionThrown when boolean path operations are unavailable; this feature requires the SkiaSharp backend (install the Aspose.SVG.Drawing.SkiaSharp package).

See Also