ID2D1Bitmap interface
Represents a bitmap that has been bound to an ID2D1RenderTarget.
When to implement
Custom implementations are not supported
Members
The ID2D1Bitmap interface inherits from ID2D1Image. ID2D1Bitmap also has these types of members:
Methods
The ID2D1Bitmap interface has these methods.
| Method | Description |
|---|---|
| CopyFromBitmap |
Copies the specified region from the specified bitmap into the current bitmap. |
| CopyFromMemory |
Copies the specified region from memory into the current bitmap. |
| CopyFromRenderTarget |
Copies the specified region from the specified render target into the current bitmap. |
| GetDpi |
Return the dots per inch (DPI) of the bitmap. |
| GetPixelFormat |
Retrieves the pixel format and alpha mode of the bitmap. |
| GetPixelSize |
Returns the size, in device-dependent units (pixels), of the bitmap. |
| GetSize |
Returns the size, in device-independent pixels (DIPs), of the bitmap. |
Remarks
Creating ID2D1Bitmap Objects
To create a bitmap, use one of the following methods of the render target on which the bitmap will be drawn:
For information about the pixel formats supported by Direct2D bitmaps, see Supported Pixel Formats and Alpha Modes.
An ID2D1Bitmap is a device-dependent resource: your application should create bitmaps after it initializes the render target with which the bitmap will be used, and recreate the bitmap whenever the render target needs recreated. (For more information about resources, see Resources Overview.)
Examples
For examples that show how to create an ID2D1Bitmap from a WIC bitmap, see How to Load a Bitmap from a File and How to Load a Bitmap from a Resource.
Requirements
|
Minimum supported client |
Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- ID2D1Image
- How to Load a Bitmap from a File
- How to Load a Bitmap from a Resource
- Supported Pixel Formats and Alpha Modes