Delen via


CompositionBitmapInterpolationMode Enum

Definition

Specifies the algorithm used for interpolating pixels from ICompositionSurface when they do not form a one-to-one mapping to pixels on screen.

public enum class CompositionBitmapInterpolationMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
enum class CompositionBitmapInterpolationMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
public enum CompositionBitmapInterpolationMode
Public Enum CompositionBitmapInterpolationMode
Inheritance
CompositionBitmapInterpolationMode
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10586.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v2.0)

Fields

Name Value Description
NearestNeighbor 0

Use the exact color of the nearest bitmap pixel to the current rendering pixel.

Linear 1

Interpolate a color from the four bitmap pixels that are the nearest to the current rendering pixel.

MagLinearMinLinearMipLinear 2

Use Linear interpolation for magnification, minification, and mip-level sampling.

MagLinearMinLinearMipNearest 3

Use Linear interpolation for magnification and minification; use NearestNeighbor for mip-level sampling.

MagLinearMinNearestMipLinear 4

Use Linear interpolation for magnification; use NearestNeighbor for minification; use Linear interpolation for mip-level sampling.

MagLinearMinNearestMipNearest 5

Use Linear interpolation for magnification; use NearestNeighbor for minification and mip-level sampling.

MagNearestMinLinearMipLinear 6

Use NearestNeighbor for magnification; use Linear interpolation for minification and mip-level sampling.

MagNearestMinLinearMipNearest 7

Use NearestNeighbor for magnification; use Linear interpolation for minification; use NearestNeighbor for mip-level sampling.

MagNearestMinNearestMipLinear 8

Use NearestNeighbor for magnification and minification; use Linear interpolation for mip-level sampling.

MagNearestMinNearestMipNearest 9

Use NearestNeighbor for magnification, minification, and mip-level sampling.

Remarks

Interpolating pixels is necessary when the pixels of an ICompositionSurface do not form a one-to-one mapping to the pixels of a SpriteVisual; this can happen under scale, stretch, rotation, skew, or other transformations (such as perspective projection, etc.).

When the bitmap contents of an ICompositionSurface are mapped to a SpriteVisual whose size is larger than that of the bitmap, each pixel from the surface must be mapped to a group of pixels on screen.

Conversely, when the bitmap contents of an ICompositionSurface are mapped to a SpriteVisual whose size is smaller than that of the bitmap, multiple pixels from the surface must be mapped to single pixels on screen.

Version history

Windows version SDK version Value added
1903 18362 MagLinearMinLinearMipLinear
1903 18362 MagLinearMinLinearMipNearest
1903 18362 MagLinearMinNearestMipLinear
1903 18362 MagLinearMinNearestMipNearest
1903 18362 MagNearestMinLinearMipLinear
1903 18362 MagNearestMinLinearMipNearest
1903 18362 MagNearestMinNearestMipLinear
1903 18362 MagNearestMinNearestMipNearest

Applies to