ID2D1RenderTarget::CreateLinearGradientBrush method

Creates an ID2D1LinearGradientBrush object for painting areas with a linear gradient.

Overload list

Method Description
CreateLinearGradientBrush(D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES&,ID2D1GradientStopCollection*,ID2D1LinearGradientBrush**) Creates an ID2D1LinearGradientBrush that contains the specified gradient stops, has no transform, and has a base opacity of 1.0.
CreateLinearGradientBrush(D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES&,D2D1_BRUSH_PROPERTIES&,ID2D1GradientStopCollection*,ID2D1LinearGradientBrush**) Creates an ID2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.
CreateLinearGradientBrush(D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES*,D2D1_BRUSH_PROPERTIES*,ID2D1GradientStopCollection*,ID2D1LinearGradientBrush**) Creates an ID2D1LinearGradientBrush that contains the specified gradient stops and has the specified transform and base opacity.

Syntax

HRESULT CreateLinearGradientBrush(
  const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *linearGradientBrushProperties,
  const D2D1_BRUSH_PROPERTIES                 *brushProperties,
  ID2D1GradientStopCollection                 *gradientStopCollection,
  ID2D1LinearGradientBrush                    **linearGradientBrush
);

Parameters

linearGradientBrushProperties

brushProperties

gradientStopCollection

linearGradientBrush

Return Value

None

Requirements

   
Target Platform Windows
Header d2d1.h
Library D2d1.lib
DLL D2d1.dll

See Also

Brushes Overview

CreateGradientStopCollection

How to Create a Linear Gradient Brush

ID2D1GradientStopCollection

ID2D1LinearGradientBrush

ID2D1RadialGradientBrush

ID2D1RenderTarget