Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1SourceTransform::Draw method

Draws the transform to the graphics processing unit (GPU)–based Direct2D pipeline.

Syntax


HRESULT Draw(
  [in]  ID2D1Bitmap1 *target,
  [in]  const D2D1_RECT_L *drawRect,
  D2D1_POINT_2U targetOrigin
);

Parameters

target [in]

Type: ID2D1Bitmap1*

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.

targetOrigin

Type: D2D1_POINT_2U

The origin within the target bitmap to which the source data should be drawn.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

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:

  1. Call the ID2D1Bitmap::Map method with the D2D1_MAP_OPTIONS_DISCARD and D2D1_MAP_OPTIONS_WRITE flags.
  2. Update the buffer this method returns.
  3. 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.

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

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1SourceTransform
ID2D1EffectImpl

 

 

Community Additions

Show:
© 2014 Microsoft