DpiHelper.CreateDeviceFromLogicalImage 方法

定义

重载

CreateDeviceFromLogicalImage(Icon, ImageScalingMode)

创建并返回为设备单元缩放的新图标。 显示在设备上时,缩放图标的大小与原始图标在96dpi 显示时的大小相同。

CreateDeviceFromLogicalImage(Image, ImageScalingMode)

从逻辑 System.object 创建并返回一个新的位图或图元文件。 显示在设备上时,缩放的图像的大小将与原始图像的大小相同,因为在96dpi 中显示。

CreateDeviceFromLogicalImage(ImageList, ImageScalingMode)

创建并返回在设备上显示的设备单元的新的 imagelist,缩放后的 imagelist 的大小与原始 imagelist 在96dpi 时所具有的大小相同。

CreateDeviceFromLogicalImage(Bitmap, Size, ImageScalingMode)

使用 NearestNeighbor 内插,从逻辑系统创建并返回一个新的位图条,并为设备单元缩放。 显示在设备上时,缩放的图像条的大小将与原始图像条的大小相同,因为在96dpi 中显示。

这应该用于转换 imagelists 位图条形图,而不是简单地缩放位图,因为生成的位图条带大小可能不同于只是增加位图 N * Math。舍入 (width * dpiscale) !) (= 这可能会根据图像宽度而发生,因为 dpiscale 是 double 而不是 int。

CreateDeviceFromLogicalImage(Image, Color, ImageScalingMode)

从逻辑 System.object 创建并返回一个新的位图或图元文件。 显示在设备上时,缩放的图像的大小将与原始图像的大小相同,因为在96dpi 中显示。

CreateDeviceFromLogicalImage(ImageList, Color, ImageScalingMode)

创建并返回在设备上显示的设备单元的新的 imagelist,缩放后的 imagelist 的大小与原始 imagelist 在96dpi 时所具有的大小相同。

CreateDeviceFromLogicalImage(Bitmap, Size, Color, ImageScalingMode)

从逻辑 System.web 中创建并返回一个新的位图条。当设备上显示时,缩放的图像条的大小将与原始图像条的大小相同,因为在96dpi 中显示的是原始图像条。

这应该用于转换 imagelists 位图条形图,而不是简单地缩放位图,因为生成的位图条带大小可能不同于只是增加位图 N * Math。舍入 (width * dpiscale) !) (= 这可能会根据图像宽度而发生,因为 dpiscale 是 double 而不是 int。

CreateDeviceFromLogicalImage(Icon, ImageScalingMode)

创建并返回为设备单元缩放的新图标。 显示在设备上时,缩放图标的大小与原始图标在96dpi 显示时的大小相同。

public System.Drawing.Icon CreateDeviceFromLogicalImage (System.Drawing.Icon logicalIcon, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Drawing.Icon * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Drawing.Icon
Public Function CreateDeviceFromLogicalImage (logicalIcon As Icon, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As Icon

参数

logicalIcon
Icon

用于从逻辑单元缩放到设备单位的图标

scalingMode
ImageScalingMode

缩放带中的图像时使用的缩放模式。

返回

Icon

图标。

适用于

CreateDeviceFromLogicalImage(Image, ImageScalingMode)

从逻辑 System.object 创建并返回一个新的位图或图元文件。 显示在设备上时,缩放的图像的大小将与原始图像的大小相同,因为在96dpi 中显示。

public System.Drawing.Image CreateDeviceFromLogicalImage (System.Drawing.Image logicalImage, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Drawing.Image * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Drawing.Image
Public Function CreateDeviceFromLogicalImage (logicalImage As Image, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As Image

参数

logicalImage
Image

要从逻辑单元缩放到设备单位的图像

scalingMode
ImageScalingMode

缩放图像时使用的缩放模式

返回

Image

映像。

适用于

CreateDeviceFromLogicalImage(ImageList, ImageScalingMode)

创建并返回在设备上显示的设备单元的新的 imagelist,缩放后的 imagelist 的大小与原始 imagelist 在96dpi 时所具有的大小相同。

public System.Windows.Forms.ImageList CreateDeviceFromLogicalImage (System.Windows.Forms.ImageList logicalImageList, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Windows.Forms.ImageList * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Windows.Forms.ImageList
Public Function CreateDeviceFromLogicalImage (logicalImageList As ImageList, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As ImageList

参数

logicalImageList
ImageList

从逻辑单元缩放到设备单位的 imagelist

scalingMode
ImageScalingMode

缩放 imagelist 中的图像时使用的缩放模式

返回

ImageList

ImageList。

适用于

CreateDeviceFromLogicalImage(Bitmap, Size, ImageScalingMode)

使用 NearestNeighbor 内插,从逻辑系统创建并返回一个新的位图条,并为设备单元缩放。 显示在设备上时,缩放的图像条的大小将与原始图像条的大小相同,因为在96dpi 中显示。

这应该用于转换 imagelists 位图条形图,而不是简单地缩放位图,因为生成的位图条带大小可能不同于只是增加位图 N * Math。舍入 (width * dpiscale) !) (= 这可能会根据图像宽度而发生,因为 dpiscale 是 double 而不是 int。

public System.Drawing.Bitmap CreateDeviceFromLogicalImage (System.Drawing.Bitmap logicalBitmapStrip, System.Drawing.Size logicalImageSize, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Drawing.Bitmap * System.Drawing.Size * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Drawing.Bitmap
Public Function CreateDeviceFromLogicalImage (logicalBitmapStrip As Bitmap, logicalImageSize As Size, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As Bitmap

参数

logicalBitmapStrip
Bitmap

用于从逻辑单元缩放到设备单位的图像条

logicalImageSize
Size

带区中每个图像的逻辑单元中的大小

scalingMode
ImageScalingMode

缩放带中的图像时使用的缩放模式

返回

Bitmap

位图。

适用于

CreateDeviceFromLogicalImage(Image, Color, ImageScalingMode)

从逻辑 System.object 创建并返回一个新的位图或图元文件。 显示在设备上时,缩放的图像的大小将与原始图像的大小相同,因为在96dpi 中显示。

public System.Drawing.Image CreateDeviceFromLogicalImage (System.Drawing.Image logicalImage, System.Drawing.Color backgroundColor, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Drawing.Image * System.Drawing.Color * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Drawing.Image
Public Function CreateDeviceFromLogicalImage (logicalImage As Image, backgroundColor As Color, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As Image

参数

logicalImage
Image

要从逻辑单元缩放到设备单位的图像

backgroundColor
Color

要用于图像背景的颜色值。 当内插模式为双线性或双立方时,图像的边距将与背景插值。

scalingMode
ImageScalingMode

缩放图像时使用的缩放模式

返回

Image

ImageList。

适用于

CreateDeviceFromLogicalImage(ImageList, Color, ImageScalingMode)

创建并返回在设备上显示的设备单元的新的 imagelist,缩放后的 imagelist 的大小与原始 imagelist 在96dpi 时所具有的大小相同。

public System.Windows.Forms.ImageList CreateDeviceFromLogicalImage (System.Windows.Forms.ImageList logicalImageList, System.Drawing.Color backgroundColor, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Windows.Forms.ImageList * System.Drawing.Color * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Windows.Forms.ImageList
Public Function CreateDeviceFromLogicalImage (logicalImageList As ImageList, backgroundColor As Color, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As ImageList

参数

logicalImageList
ImageList

从逻辑单元缩放到设备单位的 imagelist

backgroundColor
Color

要用于图像背景的颜色值。 当内插模式为双线性或双立方时,图像的边距将与背景插值。

scalingMode
ImageScalingMode

缩放 imagelist 时使用的缩放模式

返回

ImageList

ImageList。

适用于

CreateDeviceFromLogicalImage(Bitmap, Size, Color, ImageScalingMode)

从逻辑 System.web 中创建并返回一个新的位图条。当设备上显示时,缩放的图像条的大小将与原始图像条的大小相同,因为在96dpi 中显示的是原始图像条。

这应该用于转换 imagelists 位图条形图,而不是简单地缩放位图,因为生成的位图条带大小可能不同于只是增加位图 N * Math。舍入 (width * dpiscale) !) (= 这可能会根据图像宽度而发生,因为 dpiscale 是 double 而不是 int。

public System.Drawing.Bitmap CreateDeviceFromLogicalImage (System.Drawing.Bitmap logicalBitmapStrip, System.Drawing.Size logicalImageSize, System.Drawing.Color backgroundColor, Microsoft.VisualStudio.PlatformUI.ImageScalingMode scalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default);
member this.CreateDeviceFromLogicalImage : System.Drawing.Bitmap * System.Drawing.Size * System.Drawing.Color * Microsoft.VisualStudio.PlatformUI.ImageScalingMode -> System.Drawing.Bitmap
Public Function CreateDeviceFromLogicalImage (logicalBitmapStrip As Bitmap, logicalImageSize As Size, backgroundColor As Color, Optional scalingMode As ImageScalingMode = Microsoft.VisualStudio.PlatformUI.ImageScalingMode.Default) As Bitmap

参数

logicalBitmapStrip
Bitmap

用于从逻辑单元缩放到设备单位的图像条

logicalImageSize
Size

带区中每个图像的逻辑单元中的大小

backgroundColor
Color

要用于图像背景的颜色值。 当内插模式为双线性或双立方时,图像的边距将与背景插值。

scalingMode
ImageScalingMode

缩放带中的图像时使用的缩放模式

返回

Bitmap

位图。

适用于