ID2D1BitmapBrush::SetInterpolationMode method

Specifies the interpolation mode used when the brush bitmap is scaled or rotated.

Syntax


virtual void SetInterpolationMode(
  D2D1_BITMAP_INTERPOLATION_MODE interpolationMode
) = 0;

Parameters

interpolationMode

Type: D2D1_BITMAP_INTERPOLATION_MODE

The interpolation mode used when the brush bitmap is scaled or rotated.

Return value

This method does not return a value.

Remarks

This method sets the interpolation mode for a bitmap, which is an enum value that is specified in the D2D1_BITMAP_INTERPOLATION_MODE enumeration type. D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR represents nearest neighbor filtering. It looks up the nearest bitmap pixel to the current rendering pixel and chooses its exact color. D2D1_BITMAP_INTERPOLATION_MODE_LINEAR represents linear filtering, and interpolates a color from the four nearest bitmap pixels.

The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, bilinear interpolation positions the bitmap more precisely to the application requests, but blurs the bitmap in the process.

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

ID2D1BitmapBrush::GetInterpolationMode
ID2D1BitmapBrush

 

 

Community Additions

ADD
Show:
© 2014 Microsoft