Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ID2D1Bitmap1::Map method (d2d1_1.h)
Maps the given bitmap into memory.
Syntax
HRESULT Map(
D2D1_MAP_OPTIONS options,
[out] D2D1_MAPPED_RECT *mappedRect
);
Parameters
options
Type: D2D1_MAP_OPTIONS
The options used in mapping the bitmap into memory.
[out] mappedRect
Type: D2D1_MAPPED_RECT*
When this method returns, contains a reference to the rectangle that is mapped into memory.
Return value
Type: HRESULT
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| HRESULT | Description |
|---|---|
| S_OK | No error occurred. |
| E_INVALIDARG | One or more arguments are not valid |
| D3DERR_DEVICELOST | The device has been lost but cannot be reset at this time. |
Remarks
Note You can't use bitmaps for some purposes while mapped. Particularly, the ID2D1Bitmap::CopyFromBitmap method doesn't work if either the source or destination bitmap is mapped.
The bitmap must have been created with the D2D1_BITMAP_OPTIONS_CPU_READ flag specified.
Requirements
| Requirement | Value |
|---|---|
| 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] |
| Target Platform | Windows |
| Header | d2d1_1.h |
| DLL | D2d1.dll |
See also
ID2D1DeviceContext::CreateBitmap
Feedback
Was this page helpful?
