ID2D1Bitmap interface (d2d1.h)
Represents a bitmap that has been bound to an ID2D1RenderTarget.
Inheritance
The ID2D1Bitmap interface inherits from ID2D1Image. ID2D1Bitmap also has these types of members:
Methods
The ID2D1Bitmap interface has these methods.
ID2D1Bitmap::CopyFromBitmap Copies the specified region from the specified bitmap into the current bitmap. |
ID2D1Bitmap::CopyFromMemory Copies the specified region from memory into the current bitmap. |
ID2D1Bitmap::CopyFromRenderTarget Copies the specified region from the specified render target into the current bitmap. |
ID2D1Bitmap::GetDpi Return the dots per inch (DPI) of the bitmap. |
ID2D1Bitmap::GetPixelFormat Retrieves the pixel format and alpha mode of the bitmap. |
ID2D1Bitmap::GetPixelSize Returns the size, in device-dependent units (pixels), of the bitmap. |
ID2D1Bitmap::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
Requirement | Value |
---|---|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | d2d1.h |
See also
How to Load a Bitmap from a File