Draws the transform to the graphics processing unit (GPU)–based Direct2D pipeline.
HRESULT Draw( [in] ID2D1Bitmap1 *target, [in] const D2D1_RECT_L *drawRect, D2D1_POINT_2U targetOrigin );
- target [in]
The target to which the transform should be written.
- drawRect [in]
Type: const D2D1_RECT_L*
The area within the source from which the image should be drawn.
The origin within the target bitmap to which the source data should be drawn.
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
The implementation of the rasterizer guarantees that adding the renderRect to the targetOrigin does not exceed the bounds of the bitmap.
When implementing this method you must update the bitmap in this way:
- Call the ID2D1Bitmap::Map method with the D2D1_MAP_OPTIONS_DISCARD and D2D1_MAP_OPTIONS_WRITE flags.
- Update the buffer this method returns.
- Call the ID2D1Bitmap::Unmap method.
If you set the buffer precision manually on the associated ID2D1RenderInfo object, it must handle different pixel formats in this method by calling ID2D1Bitmap::GetPixelFormat. If you set the buffer precision manually, then you can rely on that format always being the one you provided.
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]|