ID2D1Bitmap1::Map method

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.

mappedRect [out]

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.

HRESULTDescription
S_OKNo error occurred.
E_INVALIDARGOne or more arguments are not valid
D3DERR_DEVICELOSTThe 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

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1Bitmap1
ID2D1RenderTarget::CreateSharedBitmap
ID2D1DeviceContext::CreateBitmapFromDxgiSurface
ID2D1DeviceContext::CreateBitmap

 

 

Community Additions

ADD
Show:
© 2014 Microsoft