Cannot create ID2D1Bitmap1 by calling ID2D1DeviceContext::CreateBitmap
- Dominant language
- C#
- Stars
- 5.2k
- Forks
- 477
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
I hope to make a `ID2D1Bitmap1` by calling `ID2D1DeviceContext.CreateBitmap` method, but it only has the `ID2DBitmap` version.
I need to make this bitmap accessible to the CPU, so `BitmapProperties1` is necessary because it has an additional public field `public BitmapOptions BitmapOptions;` that `BitmapProperties` doesn't have.
Here is the api code from [Direct2D API website](https://learn.microsoft.com/en-us/windows/win32/api/d2d1_1/nf-d2d1_1-id2d1devicecontext-createbitmap(d2d1_size_u_constvoid_uint32_constd2d1_bitmap_properties1__id2d1bitmap1)).
``` c++
HRESULT CreateBitmap(
D2D1_SIZE_U size,
[in, optional] const void *sourceData,
UINT32 pitch,
[in] const D2D1_BITMAP_PROPERTIES1 & bitmapProperties,
[out] ID2D1Bitmap1 **bitmap
);
```
Please add `ID2D1DeviceContext.CreateBitmap` method for `ID2D1Bitmap1` version.
Contributor guide
Assessment
This issue has not been assessed yet.