D2D1_MAP_OPTIONS enumeration (d2d1_1.h)

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

Syntax

typedef enum D2D1_MAP_OPTIONS {
  D2D1_MAP_OPTIONS_NONE = 0,
  D2D1_MAP_OPTIONS_READ = 1,
  D2D1_MAP_OPTIONS_WRITE = 2,
  D2D1_MAP_OPTIONS_DISCARD = 4,
  D2D1_MAP_OPTIONS_FORCE_DWORD = 0xffffffff
} ;

Constants

 
D2D1_MAP_OPTIONS_NONE
Value: 0
D2D1_MAP_OPTIONS_READ
Value: 1
Allow CPU Read access.
D2D1_MAP_OPTIONS_WRITE
Value: 2
Allow CPU Write access.
D2D1_MAP_OPTIONS_DISCARD
Value: 4
Discard the previous contents of the resource when it is mapped.
D2D1_MAP_OPTIONS_FORCE_DWORD
Value: 0xffffffff

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

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]
Header d2d1_1.h

See also

ID2D1Bitmap1::Map