Windows apps
Collapse the table of content
Expand the table of content
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.

ID2D1RenderTarget::DrawBitmap method

Draws the specified bitmap after scaling it to the size of the specified rectangle.

Syntax


void DrawBitmap(
  [in]        ID2D1Bitmap                    *bitmap,
  [ref] const D2D1_RECT_F                    &destinationRectangle,
              FLOAT                          opacity,
              D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,
  [ref] const D2D1_RECT_F                    &sourceRectangle
);

Parameters

bitmap [in]

Type: ID2D1Bitmap*

The bitmap to render.

destinationRectangle [ref]

Type: const D2D1_RECT_F

The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. If the rectangle is not well-ordered, nothing is drawn, but the render target does not enter an error state.

opacity

Type: FLOAT

A value between 0.0f and 1.0f, inclusive, that specifies an opacity value to apply to the bitmap; this value is multiplied against the alpha values of the bitmap's contents.

interpolationMode

Type: D2D1_BITMAP_INTERPOLATION_MODE

The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation.

sourceRectangle [ref]

Type: const D2D1_RECT_F

The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to draw.

Return value

This method does not return a value.

Remarks

This method doesn't return an error code if it fails. To determine whether a drawing operation (such as DrawBitmap) failed, check the result returned by the ID2D1RenderTarget::EndDraw or ID2D1RenderTarget::Flush methods.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

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

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget

 

 

Show:
© 2017 Microsoft