CD2DRadialGradientBrush Class
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at CD2DRadialGradientBrush Class.
A wrapper for ID2D1RadialGradientBrush.
class CD2DRadialGradientBrush : public CD2DGradientBrush;
Name | Description |
---|---|
CD2DRadialGradientBrush::CD2DRadialGradientBrush | Constructs a CD2DLinearGradientBrush object. |
CD2DRadialGradientBrush::~CD2DRadialGradientBrush | The destructor. Called when a D2D radial gradient brush object is being destroyed. |
Name | Description |
---|---|
CD2DRadialGradientBrush::Attach | Attaches existing resource interface to the object |
CD2DRadialGradientBrush::Create | Creates a CD2DRadialGradientBrush. (Overrides CD2DResource::Create.) |
CD2DRadialGradientBrush::Destroy | Destroys a CD2DRadialGradientBrush object. (Overrides CD2DGradientBrush::Destroy.) |
CD2DRadialGradientBrush::Detach | Detaches resource interface from the object |
CD2DRadialGradientBrush::Get | Returns ID2D1RadialGradientBrush interface |
CD2DRadialGradientBrush::GetCenter | Retrieves the center of the gradient ellipse |
CD2DRadialGradientBrush::GetGradientOriginOffset | Retrieves the offset of the gradient origin relative to the gradient ellipse's center |
CD2DRadialGradientBrush::GetRadiusX | Retrieves the x-radius of the gradient ellipse |
CD2DRadialGradientBrush::GetRadiusY | Retrieves the y-radius of the gradient ellipse |
CD2DRadialGradientBrush::SetCenter | Specifies the center of the gradient ellipse in the brush's coordinate space |
CD2DRadialGradientBrush::SetGradientOriginOffset | Specifies the offset of the gradient origin relative to the gradient ellipse's center |
CD2DRadialGradientBrush::SetRadiusX | Specifies the x-radius of the gradient ellipse, in the brush's coordinate space |
CD2DRadialGradientBrush::SetRadiusY | Specifies the y-radius of the gradient ellipse, in the brush's coordinate space |
Name | Description |
---|---|
CD2DRadialGradientBrush::operator ID2D1RadialGradientBrush* | Returns ID2D1RadialGradientBrush interface |
Name | Description |
---|---|
CD2DRadialGradientBrush::m_pRadialGradientBrush | A pointer to an ID2D1RadialGradientBrush. |
CD2DRadialGradientBrush::m_RadialGradientBrushProperties | The center, gradient origin offset, and x-radius and y-radius of the brush's gradient. |
Header: afxrendertarget.h
The destructor. Called when a D2D radial gradient brush object is being destroyed.
virtual ~CD2DRadialGradientBrush();
Attaches existing resource interface to the object
void Attach(ID2D1RadialGradientBrush* pResource);
pResource
Existing resource interface. Cannot be NULL
Constructs a CD2DLinearGradientBrush object.
CD2DRadialGradientBrush(
CRenderTarget* pParentTarget,
const D2D1_GRADIENT_STOP* gradientStops,
UINT gradientStopsCount,
D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES RadialGradientBrushProperties,
D2D1_GAMMA colorInterpolationGamma = D2D1_GAMMA_2_2,
D2D1_EXTEND_MODE extendMode = D2D1_EXTEND_MODE_CLAMP,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
gradientStops
A pointer to an array of D2D1_GRADIENT_STOP structures.
gradientStopsCount
A value greater than or equal to 1 that specifies the number of gradient stops in the gradientStops array.
RadialGradientBrushProperties
The center, gradient origin offset, and x-radius and y-radius of the brush's gradient.
colorInterpolationGamma
The space in which color interpolation between the gradient stops is performed.
extendMode
The behavior of the gradient outside the [0,1] normalized range.
pBrushProperties
A pointer to the opacity and transformation of a brush.
bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).
Creates a CD2DRadialGradientBrush.
virtual HRESULT Create(CRenderTarget* pRenderTarget);
pRenderTarget
A pointer to the render target.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Destroys a CD2DRadialGradientBrush object.
virtual void Destroy();
Detaches resource interface from the object
ID2D1RadialGradientBrush* Detach();
Pointer to detached resource interface.
Returns ID2D1RadialGradientBrush interface
ID2D1RadialGradientBrush* Get();
Pointer to an ID2D1RadialGradientBrush interface or NULL if object is not initialized yet.
Retrieves the center of the gradient ellipse
CD2DPointF GetCenter() const;
The center of the gradient ellipse. This value is expressed in the brush's coordinate space
Retrieves the offset of the gradient origin relative to the gradient ellipse's center
CD2DPointF GetGradientOriginOffset() const;
The offset of the gradient origin from the center of the gradient ellipse. This value is expressed in the brush's coordinate space
Retrieves the x-radius of the gradient ellipse
FLOAT GetRadiusX() const;
The x-radius of the gradient ellipse. This value is expressed in the brush's coordinate space
Retrieves the y-radius of the gradient ellipse
FLOAT GetRadiusY() const;
The y-radius of the gradient ellipse. This value is expressed in the brush's coordinate space
A pointer to an ID2D1RadialGradientBrush.
ID2D1RadialGradientBrush* m_pRadialGradientBrush;
The center, gradient origin offset, and x-radius and y-radius of the brush's gradient.
D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES m_RadialGradientBrushProperties;
Returns ID2D1RadialGradientBrush interface
operator ID2D1RadialGradientBrush*();
Pointer to an ID2D1RadialGradientBrush interface or NULL if object is not initialized yet.
Specifies the center of the gradient ellipse in the brush's coordinate space
void SetCenter(CD2DPointF point);
point
The center of the gradient ellipse, in the brush's coordinate space
Specifies the offset of the gradient origin relative to the gradient ellipse's center
void SetGradientOriginOffset(CD2DPointF gradientOriginOffset);
gradientOriginOffset
The offset of the gradient origin from the center of the gradient ellipse
Specifies the x-radius of the gradient ellipse, in the brush's coordinate space
void SetRadiusX(FLOAT radiusX);
radiusX
The x-radius of the gradient ellipse. This value is in the brush's coordinate space
Specifies the y-radius of the gradient ellipse, in the brush's coordinate space
void SetRadiusY(FLOAT radiusY);
radiusY
The y-radius of the gradient ellipse. This value is in the brush's coordinate space