ID2D1DeviceContext1::DrawGeometryRealization method

Renders a given geometry realization to the target with the specified brush.

Syntax


HRESULT DrawGeometryRealization(
  [in] ID2D1GeometryRealization *geometryRealization,
  [in] ID2D1Brush               *brush
);

Parameters

geometryRealization [in]

Type: ID2D1GeometryRealization*

The geometry realization to be rendered.

brush [in]

Type: ID2D1Brush*

The brush to render the realization with.

Return value

Type: HRESULT

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid value was passed to the method.

 

Remarks

This method respects all currently set state (transform, DPI, unit mode, target image, clips, layers); however, artifacts such as faceting may appear when rendering the realizations with a large effective scale (either via the transform or the DPI). Callers should create their realizations with an appropriate flattening tolerance using either D2D1_DEFAULT_FLATTENING_TOLERANCE or ComputeFlatteningTolerance to compensate for this.

Additionally, callers should be aware of the safe render bounds when creating geometry realizations. If a geometry extends outside of [-524,287, 524,287] DIPs in either the X- or the Y- direction in its original (pre-transform) coordinate space, then it may be clipped to those bounds when it is realized. This clipping will be visible even if the realization is subsequently transformed to fit within the safe render bounds.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_2.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1DeviceContext1

 

 

Show: