Creates a bitmap that can be used as a target surface, for reading back to the CPU, or as a source for the DrawBitmap and ID2D1BitmapBrush APIs. In addition, color context information can be passed to the bitmap.
HRESULT CreateBitmap( D2D1_SIZE_U size, const void *sourceData, UINT32 pitch, const D2D1_BITMAP_PROPERTIES1 & bitmapProperties, ID2D1Bitmap1 **bitmap );
The pixel size of the bitmap to be created.
Type: const void*
The initial data that will be loaded into the bitmap.
The pitch of the source data, if specified.
Type: const D2D1_BITMAP_PROPERTIES1*
The properties of the bitmap to be created.
When this method returns, contains the address of a pointer to a new bitmap object.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
|S_OK||No error occurred.|
|E_OUTOFMEMORY||Direct2D could not allocate sufficient memory to complete the call.|
|E_INVALIDARG||An invalid value was passed to the method.|
|D3DERR_OUTOFVIDEOMEMORY||Direct3D does not have enough display memory to perform the operation.|
|Minimum supported client||Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]|