description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CD2DSolidColorBrush Class |
CD2DSolidColorBrush Class |
03/27/2019 |
|
|
d4506637-acce-4f74-8a9b-f0a45571a735 |
A wrapper for ID2D1SolidColorBrush.
class CD2DSolidColorBrush : public CD2DBrush;
Name | Description |
---|---|
CD2DSolidColorBrush::CD2DSolidColorBrush | Overloaded. Constructs a CD2DSolidColorBrush object. |
CD2DSolidColorBrush::~CD2DSolidColorBrush | The destructor. Called when a D2D solid brush object is being destroyed. |
Name | Description |
---|---|
CD2DSolidColorBrush::Attach | Attaches existing resource interface to the object |
CD2DSolidColorBrush::Create | Creates a CD2DSolidColorBrush. (Overrides CD2DResource::Create.) |
CD2DSolidColorBrush::Destroy | Destroys a CD2DSolidColorBrush object. (Overrides CD2DBrush::Destroy.) |
CD2DSolidColorBrush::Detach | Detaches resource interface from the object |
CD2DSolidColorBrush::Get | Returns ID2D1SolidColorBrush interface |
CD2DSolidColorBrush::GetColor | Retrieves the color of the solid color brush |
CD2DSolidColorBrush::SetColor | Specifies the color of this solid color brush |
Name | Description |
---|---|
CD2DSolidColorBrush::operator ID2D1SolidColorBrush* | Returns ID2D1SolidColorBrush interface |
Name | Description |
---|---|
CD2DSolidColorBrush::m_colorSolid | Brush solid color. |
CD2DSolidColorBrush::m_pSolidColorBrush | Stores a pointer to an ID2D1SolidColorBrush object. |
Header: afxrendertarget.h
The destructor. Called when a D2D solid brush object is being destroyed.
virtual ~CD2DSolidColorBrush();
Attaches existing resource interface to the object
void Attach(ID2D1SolidColorBrush* pResource);
pResource
Existing resource interface. Cannot be NULL
Constructs a CD2DSolidColorBrush object.
CD2DSolidColorBrush(
CRenderTarget* pParentTarget,
D2D1_COLOR_F color,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
CD2DSolidColorBrush(
CRenderTarget* pParentTarget,
COLORREF color,
int nAlpha = 255,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
color
The red, green, blue, and alpha values of the brush's color.
pBrushProperties
A pointer to the opacity and transformation of a brush.
bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).
nAlpha
The opacity of the brush's color.
Creates a CD2DSolidColorBrush.
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 CD2DSolidColorBrush object.
virtual void Destroy();
Detaches resource interface from the object
ID2D1SolidColorBrush* Detach();
Pointer to detached resource interface.
Returns ID2D1SolidColorBrush interface
ID2D1SolidColorBrush* Get();
Pointer to an ID2D1SolidColorBrush interface or NULL if object is not initialized yet.
Retrieves the color of the solid color brush
D2D1_COLOR_F GetColor() const;
The color of this solid color brush
Brush solid color.
D2D1_COLOR_F m_colorSolid;
Stores a pointer to an ID2D1SolidColorBrush object.
ID2D1SolidColorBrush* m_pSolidColorBrush;
Returns ID2D1SolidColorBrush interface
operator ID2D1SolidColorBrush*();
Pointer to an ID2D1SolidColorBrush interface or NULL if object is not initialized yet.
Specifies the color of this solid color brush
void SetColor(D2D1_COLOR_F color);
color
The color of this solid color brush