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(Microsoft.Foundation.LiftedContract, 65536)]
enum class CompositionBitmapInterpolationMode
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
enum class CompositionBitmapInterpolationMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
public enum CompositionBitmapInterpolationMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public enum CompositionBitmapInterpolationMode
var value = Microsoft.UI.Composition.CompositionBitmapInterpolationMode.nearestNeighbor
Public Enum CompositionBitmapInterpolationMode
Inheritance
CompositionBitmapInterpolationMode
Attributes

Fields

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.

NearestNeighbor 0

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

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.

Applies to