The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

# Geometry.Combine Method (Geometry, Geometry, GeometryCombineMode, Transform, Double, ToleranceType)

.NET Framework 3.0
Combines the two geometries using the specified GeometryCombineMode and tolerance factor, and applies the specified transform to the resulting geometry.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)

```public static PathGeometry Combine (
Geometry geometry1,
Geometry geometry2,
GeometryCombineMode mode,
Transform transform,
double tolerance,
ToleranceType type
)
```
```public static PathGeometry Combine (
Geometry geometry1,
Geometry geometry2,
GeometryCombineMode mode,
Transform transform,
double tolerance,
ToleranceType type
)
```
```public static function Combine (
geometry1 : Geometry,
geometry2 : Geometry,
mode : GeometryCombineMode,
transform : Transform,
tolerance : double,
type : ToleranceType
) : PathGeometry
```
```You cannot use methods in XAML.
```

#### Parameters

geometry1

The first geometry to combine.

geometry2

The second geometry to combine.

mode

One of the enumeration values that specifies how the geometries are combined.

transform

A transformation to apply to the combined geometry, or a null reference (Nothing in Visual Basic).

tolerance

The maximum bounds on the distance between points in the polygonal approximation of the geometries. Smaller values produce more accurate results but cause slower execution. If tolerance is less than 10-6, 10-6 is used instead.

type

One of the enumeration values, Absolute or Relative, that specifies whether the tolerance factor is an absolute value or relative to the area of this geometry.

#### Return Value

The combined geometry.

Some Geometry methods (such as Combine) produce or use a polygonal approximation of the geometry. The tolerance factor specifies the maximum distance between points in this polygonal approximation. Smaller tolerance values produce better approximations, but require more processing than an approximation with a large tolerance factor.

Careful thought should be involved when using Combine to perform a union as it can be very CPU-expensive. In most cases, a GeometryGroup or AddGeometry will work better.

Use Combine only when any of the following apply:

• The geometric operation is not a union.

• Either of the geometries have a FillRule value of EvenOdd and the geometries are self-intersecting (i.e. the FillRule actually matters).

• Time is not a concern, but space is (for instance, if the geometry is created once and then cached). Typically, Combine produces smaller output than AddGeometry.

• The resulting geometry will be stroked or used in a path animation and AddGeometry does not provide the desired outline.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

#### .NET Framework

Supported in: 3.0