ID2D1RenderTarget::FillGeometry method (d2d1.h)

Paints the interior of the specified geometry.

Syntax

void FillGeometry(
  [in]           ID2D1Geometry *geometry,
  [in]           ID2D1Brush    *brush,
  [in, optional] ID2D1Brush    *opacityBrush
);

Parameters

[in] geometry

Type: ID2D1Geometry*

The geometry to paint.

[in] brush

Type: ID2D1Brush*

The brush used to paint the geometry's interior.

[in, optional] opacityBrush

Type: ID2D1Brush*

The opacity mask to apply to the geometry, or NULL for no opacity mask. If an opacity mask (the opacityBrush parameter) is specified, brush must be an ID2D1BitmapBrush that has its x- and y-extend modes set to D2D1_EXTEND_MODE_CLAMP. For more information, see the Remarks section.

Return value

None

Remarks

If the opacityBrush parameter is not NULL, the alpha value of each pixel of the mapped opacityBrush is used to determine the resulting opacity of each corresponding pixel of the geometry. Only the alpha value of each color in the brush is used for this processing; all other color information is ignored.

The alpha value specified by the brush is multiplied by the alpha value of the geometry after the geometry has been painted by brush.

When this method fails, it does not return an error code. To determine whether a drawing operation (such as FillGeometry) failed, check the result returned by the ID2D1RenderTarget::EndDraw or ID2D1RenderTarget::Flush method.

Examples

For an example, see How to Draw and Fill a Complex Shape.

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_FILL_MODE

Geometries

Geometries Overview

ID2D1RenderTarget