BitmapScalingMode 枚举

定义

指定用于缩放位图图像的算法。Specifies which algorithm is used to scale bitmap images.

public enum class BitmapScalingMode
public enum BitmapScalingMode
type BitmapScalingMode = 
Public Enum BitmapScalingMode
继承
BitmapScalingMode

字段

Fant 2

使用超高质量 Fant 位图缩放,虽然速度比所有其他位图缩放模式都慢,但输出质量更高。Use very high quality Fant bitmap scaling, which is slower than all other bitmap scaling modes, but produces higher quality output.

HighQuality 2

使用高质量位图缩放,虽然速度比 LowQuality 模式慢,但输出质量更高。Use high quality bitmap scaling, which is slower than LowQuality mode, but produces higher quality output. HighQuality 模式与 Fant 模式相同。The HighQuality mode is the same as the Fant mode.

Linear 1

使用线性位图缩放,虽然速度比 HighQuality 模式快,但输出质量较低。Use linear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output.

LowQuality 1

使用双线性位图缩放,虽然速度比 HighQuality 快,但输出质量较低。Use bilinear bitmap scaling, which is faster than HighQuality mode, but produces lower quality output. LowQuality 模式与 Linear 模式相同。The LowQuality mode is the same as the Linear mode.

NearestNeighbor 3

使用最近邻域位图缩放,当使用软件光栅器时,该缩放提供优于 LowQuality 模式的性能。Use nearest-neighbor bitmap scaling, which provides performance benefits over LowQuality mode when the software rasterizer is used. 该模式常用于放大位图。This mode is often used to magnify a bitmap.

Unspecified 0

使用默认位图缩放模式,即 LinearUse the default bitmap scaling mode, which is Linear.

示例

下面的示例演示如何使用RenderOptions.SetBitmapScalingMode方法将位图缩放LowQuality模式设置为图像对象:The following example shows how to use the RenderOptions.SetBitmapScalingMode method to set the bitmap scale mode to LowQuality for an image object:

// Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality);
' Set the bitmap scaling mode for the image to render faster.
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality)

注解

对任何位图的刻度进行动画处理时, 默认的高质量图像重新采样算法有时会消耗足够的系统资源, 导致帧速率下降。When animating the scale of any bitmap, the default high-quality image resampling algorithm can sometimes consume sufficient system resources to cause frame rate degradation. 此帧速率下降可能会导致动画跳过帧或断断续续。This frame rate degradation can cause animations to skip frames or stutter. 通过将RenderOptions.BitmapScalingMode属性设置为LowQuality, 可以在缩放位图时创建更流畅的动画。By setting the RenderOptions.BitmapScalingMode property to LowQuality, you can create a smoother animation when scaling a bitmap.

适用于

另请参阅