Skip to content

Latest commit

 

History

History
317 lines (204 loc) · 10.9 KB

cd2dradialgradientbrush-class.md

File metadata and controls

317 lines (204 loc) · 10.9 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CD2DRadialGradientBrush Class
CD2DRadialGradientBrush Class
11/04/2016
CD2DRadialGradientBrush
AFXRENDERTARGET/CD2DRadialGradientBrush
AFXRENDERTARGET/CD2DRadialGradientBrush::CD2DRadialGradientBrush
AFXRENDERTARGET/CD2DRadialGradientBrush::Attach
AFXRENDERTARGET/CD2DRadialGradientBrush::Create
AFXRENDERTARGET/CD2DRadialGradientBrush::Destroy
AFXRENDERTARGET/CD2DRadialGradientBrush::Detach
AFXRENDERTARGET/CD2DRadialGradientBrush::Get
AFXRENDERTARGET/CD2DRadialGradientBrush::GetCenter
AFXRENDERTARGET/CD2DRadialGradientBrush::GetGradientOriginOffset
AFXRENDERTARGET/CD2DRadialGradientBrush::GetRadiusX
AFXRENDERTARGET/CD2DRadialGradientBrush::GetRadiusY
AFXRENDERTARGET/CD2DRadialGradientBrush::SetCenter
AFXRENDERTARGET/CD2DRadialGradientBrush::SetGradientOriginOffset
AFXRENDERTARGET/CD2DRadialGradientBrush::SetRadiusX
AFXRENDERTARGET/CD2DRadialGradientBrush::SetRadiusY
AFXRENDERTARGET/CD2DRadialGradientBrush::m_pRadialGradientBrush
AFXRENDERTARGET/CD2DRadialGradientBrush::m_RadialGradientBrushProperties
CD2DRadialGradientBrush [MFC], CD2DRadialGradientBrush
CD2DRadialGradientBrush [MFC], Attach
CD2DRadialGradientBrush [MFC], Create
CD2DRadialGradientBrush [MFC], Destroy
CD2DRadialGradientBrush [MFC], Detach
CD2DRadialGradientBrush [MFC], Get
CD2DRadialGradientBrush [MFC], GetCenter
CD2DRadialGradientBrush [MFC], GetGradientOriginOffset
CD2DRadialGradientBrush [MFC], GetRadiusX
CD2DRadialGradientBrush [MFC], GetRadiusY
CD2DRadialGradientBrush [MFC], SetCenter
CD2DRadialGradientBrush [MFC], SetGradientOriginOffset
CD2DRadialGradientBrush [MFC], SetRadiusX
CD2DRadialGradientBrush [MFC], SetRadiusY
CD2DRadialGradientBrush [MFC], m_pRadialGradientBrush
CD2DRadialGradientBrush [MFC], m_RadialGradientBrushProperties
6c76d84a-d831-4ee2-96f1-82c1f5b0d6a9

CD2DRadialGradientBrush Class

A wrapper for ID2D1RadialGradientBrush.

Syntax

class CD2DRadialGradientBrush : public CD2DGradientBrush;

Members

Public Constructors

Name Description
CD2DRadialGradientBrush::CD2DRadialGradientBrush Constructs a CD2DLinearGradientBrush object.
CD2DRadialGradientBrush::~CD2DRadialGradientBrush The destructor. Called when a D2D radial gradient brush object is being destroyed.

Public Methods

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

Public Operators

Name Description
CD2DRadialGradientBrush::operator ID2D1RadialGradientBrush* Returns ID2D1RadialGradientBrush interface

Protected Data Members

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.

Inheritance Hierarchy

CObject

CD2DResource

CD2DBrush

CD2DGradientBrush

CD2DRadialGradientBrush

Requirements

Header: afxrendertarget.h

CD2DRadialGradientBrush::~CD2DRadialGradientBrush

The destructor. Called when a D2D radial gradient brush object is being destroyed.

virtual ~CD2DRadialGradientBrush();

CD2DRadialGradientBrush::Attach

Attaches existing resource interface to the object

void Attach(ID2D1RadialGradientBrush* pResource);

Parameters

pResource
Existing resource interface. Cannot be NULL

CD2DRadialGradientBrush::CD2DRadialGradientBrush

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);

Parameters

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).

CD2DRadialGradientBrush::Create

Creates a CD2DRadialGradientBrush.

virtual HRESULT Create(CRenderTarget* pRenderTarget);

Parameters

pRenderTarget
A pointer to the render target.

Return Value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

CD2DRadialGradientBrush::Destroy

Destroys a CD2DRadialGradientBrush object.

virtual void Destroy();

CD2DRadialGradientBrush::Detach

Detaches resource interface from the object

ID2D1RadialGradientBrush* Detach();

Return Value

Pointer to detached resource interface.

CD2DRadialGradientBrush::Get

Returns ID2D1RadialGradientBrush interface

ID2D1RadialGradientBrush* Get();

Return Value

Pointer to an ID2D1RadialGradientBrush interface or NULL if object is not initialized yet.

CD2DRadialGradientBrush::GetCenter

Retrieves the center of the gradient ellipse

CD2DPointF GetCenter() const;

Return Value

The center of the gradient ellipse. This value is expressed in the brush's coordinate space

CD2DRadialGradientBrush::GetGradientOriginOffset

Retrieves the offset of the gradient origin relative to the gradient ellipse's center

CD2DPointF GetGradientOriginOffset() const;

Return Value

The offset of the gradient origin from the center of the gradient ellipse. This value is expressed in the brush's coordinate space

CD2DRadialGradientBrush::GetRadiusX

Retrieves the x-radius of the gradient ellipse

FLOAT GetRadiusX() const;

Return Value

The x-radius of the gradient ellipse. This value is expressed in the brush's coordinate space

CD2DRadialGradientBrush::GetRadiusY

Retrieves the y-radius of the gradient ellipse

FLOAT GetRadiusY() const;

Return Value

The y-radius of the gradient ellipse. This value is expressed in the brush's coordinate space

CD2DRadialGradientBrush::m_pRadialGradientBrush

A pointer to an ID2D1RadialGradientBrush.

ID2D1RadialGradientBrush* m_pRadialGradientBrush;

CD2DRadialGradientBrush::m_RadialGradientBrushProperties

The center, gradient origin offset, and x-radius and y-radius of the brush's gradient.

D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES m_RadialGradientBrushProperties;

CD2DRadialGradientBrush::operator ID2D1RadialGradientBrush*

Returns ID2D1RadialGradientBrush interface

operator ID2D1RadialGradientBrush*();

Return Value

Pointer to an ID2D1RadialGradientBrush interface or NULL if object is not initialized yet.

CD2DRadialGradientBrush::SetCenter

Specifies the center of the gradient ellipse in the brush's coordinate space

void SetCenter(CD2DPointF point);

Parameters

point
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

void SetGradientOriginOffset(CD2DPointF gradientOriginOffset);

Parameters

gradientOriginOffset
The offset of the gradient origin from the center of the gradient ellipse

CD2DRadialGradientBrush::SetRadiusX

Specifies the x-radius of the gradient ellipse, in the brush's coordinate space

void SetRadiusX(FLOAT radiusX);

Parameters

radiusX
The x-radius of the gradient ellipse. This value is in the brush's coordinate space

CD2DRadialGradientBrush::SetRadiusY

Specifies the y-radius of the gradient ellipse, in the brush's coordinate space

void SetRadiusY(FLOAT radiusY);

Parameters

radiusY
The y-radius of the gradient ellipse. This value is in the brush's coordinate space

See also

Classes