CD2DBitmapBrush 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 CD2DBitmapBrush Class.
A wrapper for ID2D1BitmapBrush.
class CD2DBitmapBrush : public CD2DBrush;
Name | Description |
---|---|
CD2DBitmapBrush::CD2DBitmapBrush | Overloaded. Constructs a CD2DBitmapBrush object from file. |
CD2DBitmapBrush::~CD2DBitmapBrush | The destructor. Called when a D2D bitmap brush object is being destroyed. |
Name | Description |
---|---|
CD2DBitmapBrush::Attach | Attaches existing resource interface to the object |
CD2DBitmapBrush::Create | Creates a CD2DBitmapBrush. (Overrides CD2DResource::Create.) |
CD2DBitmapBrush::Destroy | Destroys a CD2DBitmapBrush object. (Overrides CD2DBrush::Destroy.) |
CD2DBitmapBrush::Detach | Detaches resource interface from the object |
CD2DBitmapBrush::Get | Returns ID2D1BitmapBrush interface |
CD2DBitmapBrush::GetBitmap | Gets the bitmap source that this brush uses to paint |
CD2DBitmapBrush::GetExtendModeX | Gets the method by which the brush horizontally tiles those areas that extend past its bitmap |
CD2DBitmapBrush::GetExtendModeY | Gets the method by which the brush vertically tiles those areas that extend past its bitmap |
CD2DBitmapBrush::GetInterpolationMode | Gets the interpolation method used when the brush bitmap is scaled or rotated |
CD2DBitmapBrush::SetBitmap | Specifies the bitmap source that this brush uses to paint |
CD2DBitmapBrush::SetExtendModeX | Specifies how the brush horizontally tiles those areas that extend past its bitmap |
CD2DBitmapBrush::SetExtendModeY | Specifies how the brush vertically tiles those areas that extend past its bitmap |
CD2DBitmapBrush::SetInterpolationMode | Specifies the interpolation mode used when the brush bitmap is scaled or rotated |
Name | Description |
---|---|
CD2DBitmapBrush::CommonInit | Initializes the object |
Name | Description |
---|---|
CD2DBitmapBrush::operator ID2D1BitmapBrush* | Returns ID2D1BitmapBrush interface |
Name | Description |
---|---|
CD2DBitmapBrush::m_pBitmap | Stores a pointer to a CD2DBitmap object. |
CD2DBitmapBrush::m_pBitmapBrush | Stores a pointer to an ID2D1BitmapBrush object. |
CD2DBitmapBrush::m_pBitmapBrushProperties | Bitmap brush properties. |
Header: afxrendertarget.h
The destructor. Called when a D2D bitmap brush object is being destroyed.
virtual ~CD2DBitmapBrush();
Attaches existing resource interface to the object
void Attach(ID2D1BitmapBrush* pResource);
pResource
Existing resource interface. Cannot be NULL
Constructs a CD2DBitmapBrush object.
CD2DBitmapBrush(
CRenderTarget* pParentTarget,
D2D1_BITMAP_BRUSH_PROPERTIES* pBitmapBrushProperties = NULL,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
CD2DBitmapBrush(
CRenderTarget* pParentTarget,
UINT uiResID,
LPCTSTR lpszType = NULL,
CD2DSizeU sizeDest = CD2DSizeU(0, 0),
D2D1_BITMAP_BRUSH_PROPERTIES* pBitmapBrushProperties = NULL,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
CD2DBitmapBrush(
CRenderTarget* pParentTarget,
LPCTSTR lpszImagePath,
CD2DSizeU sizeDest = CD2DSizeU(0, 0),
D2D1_BITMAP_BRUSH_PROPERTIES* pBitmapBrushProperties = NULL,
CD2DBrushProperties* pBrushProperties = NULL,
BOOL bAutoDestroy = TRUE);
pParentTarget
A pointer to the render target.
pBitmapBrushProperties
A pointer to the extend modes and the interpolation mode of a bitmap brush.
pBrushProperties
A pointer to the opacity and transformation of a brush.
bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).
uiResID
The resource ID number of the resource.
lpszType
Pointer to a null-terminated string that contains the resource type.
sizeDest
Destination size of the bitmap.
lpszImagePath
Pointer to a null-terminated string that contains the name of file.
Initializes the object
void CommonInit(D2D1_BITMAP_BRUSH_PROPERTIES* pBitmapBrushProperties);
pBitmapBrushProperties
A pointer to the bitmap brush properties.
Creates a CD2DBitmapBrush.
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 CD2DBitmapBrush object.
virtual void Destroy();
Detaches resource interface from the object
ID2D1BitmapBrush* Detach();
Pointer to detached resource interface.
Returns ID2D1BitmapBrush interface
ID2D1BitmapBrush* Get();
Pointer to an ID2D1BitmapBrush interface or NULL if object is not initialized yet.
Gets the bitmap source that this brush uses to paint
CD2DBitmap* GetBitmap();
Pointer to an CD2DBitmap object or NULL if object is not initialized yet.
Gets the method by which the brush horizontally tiles those areas that extend past its bitmap
D2D1_EXTEND_MODE GetExtendModeX() const;
A value that specifies how the brush horizontally tiles those areas that extend past its bitmap
Gets the method by which the brush vertically tiles those areas that extend past its bitmap
D2D1_EXTEND_MODE GetExtendModeY() const;
A value that specifies how the brush vertically tiles those areas that extend past its bitmap
Gets the interpolation method used when the brush bitmap is scaled or rotated
D2D1_BITMAP_INTERPOLATION_MODE GetInterpolationMode() const;
The interpolation method used when the brush bitmap is scaled or rotated
Stores a pointer to a CD2DBitmap object.
CD2DBitmap* m_pBitmap;
Stores a pointer to an ID2D1BitmapBrush object.
ID2D1BitmapBrush* m_pBitmapBrush;
Bitmap brush properties.
D2D1_BITMAP_BRUSH_PROPERTIES* m_pBitmapBrushProperties;
Returns ID2D1BitmapBrush interface
operator ID2D1BitmapBrush*();
Pointer to an ID2D1BitmapBrush interface or NULL if object is not initialized yet.
Specifies the bitmap source that this brush uses to paint
void SetBitmap(CD2DBitmap* pBitmap);
pBitmap
The bitmap source used by the brush
Specifies how the brush horizontally tiles those areas that extend past its bitmap
void SetExtendModeX(D2D1_EXTEND_MODE extendModeX);
extendModeX
A value that specifies how the brush horizontally tiles those areas that extend past its bitmap
Specifies how the brush vertically tiles those areas that extend past its bitmap
void SetExtendModeY(D2D1_EXTEND_MODE extendModeY);
extendModeY
A value that specifies how the brush vertically tiles those areas that extend past its bitmap
Specifies the interpolation mode used when the brush bitmap is scaled or rotated
void SetInterpolationMode(D2D1_BITMAP_INTERPOLATION_MODE interpolationMode);
interpolationMode
The interpolation mode used when the brush bitmap is scaled or rotated