ID2D1BitmapBrush::SetInterpolationMode method (d2d1.h)

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

Syntax

void SetInterpolationMode(
  D2D1_BITMAP_INTERPOLATION_MODE interpolationMode
);

Parameters

interpolationMode

Type: D2D1_BITMAP_INTERPOLATION_MODE

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

Return value

None

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

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1.h
Library D2d1.lib
DLL D2d1.dll

See also

ID2D1BitmapBrush

ID2D1BitmapBrush::GetInterpolationMode