ID2D1Geometry::CompareWithGeometry(ID2D1Geometry*,constD2D1_MATRIX_3X2_F&,FLOAT,D2D1_GEOMETRY_RELATION*) method (d2d1.h)

Describes the intersection between this geometry and the specified geometry. The comparison is performed using the specified flattening tolerance.

Syntax

HRESULT CompareWithGeometry(
  ID2D1Geometry             *inputGeometry,
  const D2D1_MATRIX_3X2_F & inputGeometryTransform,
  FLOAT                     flatteningTolerance,
  D2D1_GEOMETRY_RELATION    *relation
);

Parameters

inputGeometry

Type: [in] ID2D1Geometry*

The geometry to test.

inputGeometryTransform

Type: [in] const D2D1_MATRIX_3X2_F &

The transform to apply to inputGeometry.

flatteningTolerance

Type: [in] FLOAT

The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.

relation

Type: [out] D2D1_GEOMETRY_RELATION*

When this method returns, contains a pointer to a value that describes how this geometry is related to inputGeometry. You must allocate storage for this parameter.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

When interpreting the returned relation value, it is important to remember that the member D2D1_GEOMETRY_RELATION_IS_CONTAINED of the D2D1_GEOMETRY_RELATION enumeration type means that this geometry is contained inside inputGeometry, not that this geometry contains inputGeometry.

For more information about how to interpret other possible return values, see D2D1_GEOMETRY_RELATION.

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h
Library D2d1.lib
DLL D2d1.dll

See also

D2D1_GEOMETRY_RELATION

ID2D1Geometry