ID2D1ImageBrush::SetSourceRectangle method

Sets the source rectangle in the image brush.

Syntax


void SetSourceRectangle(
  [in]  const D2D1_RECT_F *sourceRectangle
);

Parameters

sourceRectangle [in]

Type: const D2D1_RECT_F*

The source rectangle that defines the portion of the image to tile.

Return value

This method does not return a value.

Remarks

The top left corner of the sourceRectangle parameter maps to the brush space origin. That is, if the brush and world transforms are both identity, the portion of the image in the top left corner of the source rectangle will be rendered at (0,0) in the render target.

The source rectangle will be expanded differently depending on whether the input image is based on pixels (a bitmap or effect) or by a command list.

  • If the input image is a bitmap or an effect, the rectangle will be expanded to encapsulate a full input pixel before being additionally down-scaled to ensure that the projected rectangle will be correct in the final scene-space.
  • If the input image is a command list, the command list will be slightly expanded to encapsulate a full input pixel.

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

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1ImageBrush

 

 

Community Additions

ADD
Show:
© 2014 Microsoft