GeometryCombineMode 枚举

定义

指定可以组合两个几何图形的不同方法。

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

字段

名称 说明
Union 0

这两个区域通过采用这两个区域的联合来组合。 生成的几何图形为几何 A 图形 + 几何图形 B

Intersect 1

这两个区域通过采用其交集来组合。 新区域由两个几何图形之间的重叠区域组成。

Xor 2

这两个区域通过采用第一个区域(而不是第二个区域)和第二个区域中存在的区域而不是第一个区域来组合。 新区域包括 (A-B) + (B-A)几何图形的位置 AB 几何图形。

Exclude 3

第二个区域从第一个区域中排除。 给定两个几何图形,A几何图形的区域B将从几何B区域中删除,生成一个区域AA-B

示例

以下示例演示如何使用联合合并模式合并两个几何图形。

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

注解

下图显示了不同的几何组合模式。

应用于两个几何图形的不同
几何组合模式

适用于