CompositionBitmapInterpolationMode
CompositionBitmapInterpolationMode
CompositionBitmapInterpolationMode
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 CompositionBitmapInterpolationModepublic enum CompositionBitmapInterpolationModePublic Enum CompositionBitmapInterpolationMode// This API is not available in Javascript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10586.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v2)
|
Fields
| Linear Linear Linear Linear | Interpolate a color from the four bitmap pixels that are the nearest to the current rendering pixel. |
| NearestNeighbor NearestNeighbor NearestNeighbor NearestNeighbor | 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.