ID2D1DeviceContext1::DrawGeometryRealization method (d2d1_2.h)
Renders a given geometry realization to the target with the specified brush.
Syntax
void DrawGeometryRealization(
[in] ID2D1GeometryRealization *geometryRealization,
[in] ID2D1Brush *brush
);
Parameters
[in] geometryRealization
Type: ID2D1GeometryRealization*
The geometry realization to be rendered.
[in] brush
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.
HRESULT | Description |
---|---|
S_OK | No error occurred. |
E_OUTOFMEMORY | Direct2D could not allocate sufficient memory to complete the call. |
E_INVALIDARG | An 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
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d2d1_2.h |
Library | D2d1.lib |
DLL | D2d1.dll |