GeometryCombineMode 枚举


指定可用于合并两个几何图形的不同方法。Specifies the different methods by which two geometries can be combined.

public enum class GeometryCombineMode
public enum GeometryCombineMode
type GeometryCombineMode = 
Public Enum GeometryCombineMode


Exclude 3

从第一个区域中除去第二个区域。The second region is excluded from the first. 如果给出两个几何图形 AB,则从几何图形 B 的区域中除去几何图形 A 的区域,所产生的区域为 A-BGiven two geometries, A and B, the area of geometry B is removed from the area of geometry A, producing a region that is A-B.

Intersect 1

通过采用两个区域的交集合并两个区域。The two regions are combined by taking their intersection. 新的区域由两个几何图形之间的重叠区域组成。The new area consists of the overlapping region between the two geometries.

Union 0

通过采用两个区域的并集合并两个区域。The two regions are combined by taking the union of both. 所生成的几何图形为几何图形 A + 几何图形 BThe resulting geometry is geometry A + geometry B.

Xor 2

将在第一个区域中但不在第二个区域中的区域与在第二个区域中但不在第一个区域中的区域进行合并。The two regions are combined by taking the area that exists in the first region but not the second and the area that exists in the second region but not the first. 新的区域由 (A-B) + (B-A) 组成,其中 AB 为几何图形。The new region consists of (A-B) + (B-A), where A and B are geometries.


下面的示例演示如何使用联合组合模式合并两个几何图形。The following example shows how to combine two geometries using the Union combine mode.

<Path Stroke="Black" StrokeThickness="1" Fill="#CCCCFF">
    <!-- Combines two geometries using the union combine mode. -->
    <CombinedGeometry GeometryCombineMode="Union">
        <EllipseGeometry RadiusX="50" RadiusY="50" Center="75,75" />
        <EllipseGeometry RadiusX="50" RadiusY="50" Center="125,75" />


下图显示了不同的几何图形组合模式。The following illustration shows the different geometry combine modes.

应用于两个几何图形的不同组合模式Different combine modes applied to two geometries
几何合并模式Geometry Combine Modes