description | title | ms.date | f1_keywords | helpviewer_keywords | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: CD2DBrush Class |
CD2DBrush Class |
11/04/2016 |
|
|
A wrapper for ID2D1Brush
.
class CD2DBrush : public CD2DResource;
Name | Description |
---|---|
CD2DBrush::CD2DBrush |
Constructs a CD2DBrush object. |
CD2DBrush::~CD2DBrush |
The destructor. Called when a D2D brush object is being destroyed. |
Name | Description |
---|---|
CD2DBrush::Attach |
Attaches existing resource interface to the object |
CD2DBrush::Destroy |
Destroys a CD2DBrush object. (Overrides CD2DResource::Destroy .) |
CD2DBrush::Detach |
Detaches resource interface from the object |
CD2DBrush::Get |
Returns ID2D1Brush interface |
CD2DBrush::GetOpacity |
Gets the degree of opacity of this brush |
CD2DBrush::GetTransform |
Gets the current transform of the brush |
CD2DBrush::IsValid |
Checks resource validity (Overrides CD2DResource::IsValid .) |
CD2DBrush::SetOpacity |
Sets the degree of opacity of this brush |
CD2DBrush::SetTransform |
Applies the specified transform to the brush, replacing the existing transformation. All subsequent drawing operations occur in the transformed space |
Name | Description |
---|---|
CD2DBrush::operator ID2D1Brush* |
Returns ID2D1Brush interface |
Name | Description |
---|---|
CD2DBrush::m_pBrush |
Stores a pointer to an ID2D1Brush object. |
CD2DBrush::m_pBrushProperties |
Brush properties. |
CD2DBrush
Header: afxrendertarget.h
The destructor. Called when a D2D
brush object is being destroyed.
virtual ~CD2DBrush();
Attaches existing resource interface to the object.
void Attach(ID2D1Brush* pResource);
pResource
Existing resource interface. Can't be NULL
.
Constructs a CD2DBrush
object.
CD2DBrush(
CRenderTarget* pParentTarget,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
pBrushProperties
A pointer to the opacity and transformation of a brush.
bAutoDestroy
Indicates that the owner (pParentTarget
) destroys the object.
Destroys a CD2DBrush
object.
virtual void Destroy();
Detaches resource interface from the object.
ID2D1Brush* Detach();
Pointer to detached resource interface.
Returns ID2D1Brush
interface
ID2D1Brush* Get();
Pointer to an ID2D1Brush
interface or NULL
if object isn't initialized yet.
Gets the degree of opacity of this brush
FLOAT GetOpacity() const;
A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0 to 1 before they're multiplied together.
Gets the current transform of the brush
void GetTransform(D2D1_MATRIX_3X2_F* transform) const;
transform
When this returns, contains the current transform of the brush. This parameter is passed uninitialized.
Checks resource validity
virtual BOOL IsValid() const;
TRUE
if resource is valid; otherwise FALSE
.
Stores a pointer to an ID2D1Brush
object.
ID2D1Brush* m_pBrush;
Brush properties.
CD2DBrushProperties* m_pBrushProperties;
Returns ID2D1Brush
interface
operator ID2D1Brush*();
Pointer to an ID2D1Brush
interface or NULL if object isn't initialized yet.
Sets the degree of opacity of this brush
void SetOpacity(FLOAT opacity);
opacity
A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0 to 1 before they're multiplied together.
Applies the specified transform to the brush, replacing the existing transformation. All subsequent drawing operations occur in the transformed space.
void SetTransform(const D2D1_MATRIX_3X2_F* transform);
transform
The transform to apply to the brush