D2D1_MAP_OPTIONS Enumeration

Specifies how the memory to be mapped from the corresponding ID2D1Bitmap1 should be treated.

Syntax

typedef enum D2D1_MAP_OPTIONS {
  D2D1_MAP_OPTIONS_NONE         ,
  D2D1_MAP_OPTIONS_READ         ,
  D2D1_MAP_OPTIONS_WRITE        ,
  D2D1_MAP_OPTIONS_DISCARD      ,
  D2D1_MAP_OPTIONS_FORCE_DWORD
} ;

Constants

D2D1_MAP_OPTIONS_NONE
D2D1_MAP_OPTIONS_READ Allow CPU Read access.
D2D1_MAP_OPTIONS_WRITE Allow CPU Write access.
D2D1_MAP_OPTIONS_DISCARD Discard the previous contents of the resource when it is mapped.
D2D1_MAP_OPTIONS_FORCE_DWORD

Remarks

The D2D1_MAP_OPTIONS_READ option can be used only if the bitmap was created with the D2D1_BITMAP_OPTIONS_CPU_READ flag.

These flags will be not be able to be used on bitmaps created by the ID2D1DeviceContext. However, the ID2D1SourceTransform will receive bitmaps for which these flags are valid.

D2D1_MAP_OPTIONS_DISCARD can only be used with D2D1_MAP_OPTIONS_WRITE. Both of these options are only available through the effect author API, not through the Direct2D rendering API.

Requirements

   
Windows version Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Header d2d1_1.h

See Also

ID2D1Bitmap1::Map