ID2D1Geometry::Outline(constD2D1_MATRIX_3X2_F*,ID2D1SimplifiedGeometrySink*) method (d2d1.h)

Computes the outline of the geometry and writes the result to an ID2D1SimplifiedGeometrySink.

Syntax

HRESULT Outline(
  [in, optional] const D2D1_MATRIX_3X2_F     *worldTransform,
  [in]           ID2D1SimplifiedGeometrySink *geometrySink
);

Parameters

[in, optional] worldTransform

Type: const D2D1_MATRIX_3X2_F*

The transform to apply to the geometry outline, or NULL.

[in] geometrySink

Type: ID2D1SimplifiedGeometrySink*

The ID2D1SimplifiedGeometrySink to which the geometry's transformed outline is appended.

Return value

Type: HRESULT

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

Remarks

The Outline method allows the caller to produce a geometry with an equivalent fill to the input geometry, with the following additional properties:

  • The output geometry contains no transverse intersections; that is, segments may touch, but they never cross.
  • The outermost figures in the output geometry are all oriented counterclockwise.
  • The output geometry is fill-mode invariant; that is, the fill of the geometry does not depend on the choice of the fill mode.

    For more information about the fill mode, see D2D1_FILL_MODE.

Additionally, the Outline method can be useful in removing redundant portions of said geometries to simplify complex geometries. It can also be useful in combination with ID2D1GeometryGroup to create unions among several geometries simultaneously.

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

ID2D1Geometry