語言

WriteableBitmap 建構函式

定義

初始化 WriteableBitmap 類別的新執行個體。

多載

名稱 Description
WriteableBitmap(BitmapSource)

使用給定WriteableBitmap的 初始化類別的新實例BitmapSource。

WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette)

初始化一個新的類別實例 WriteableBitmap ,並以指定參數進行。

WriteableBitmap(BitmapSource)

使用給定WriteableBitmap的 初始化類別的新實例BitmapSource。

public:
 WriteableBitmap(System::Windows::Media::Imaging::BitmapSource ^ source);
[System.Security.SecurityCritical]
public WriteableBitmap(System.Windows.Media.Imaging.BitmapSource source);
public WriteableBitmap(System.Windows.Media.Imaging.BitmapSource source);
[<System.Security.SecurityCritical>]
new System.Windows.Media.Imaging.WriteableBitmap : System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.WriteableBitmap
new System.Windows.Media.Imaging.WriteableBitmap : System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.WriteableBitmap
Public Sub New (source As BitmapSource)

參數

source
BitmapSource

用於 BitmapSource 初始化。

屬性

備註

建構子會被優先使用 WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette) ,而非使用此建構子。

若 source 未使用原生支援的點陣圖格式,則每次影格更新都會進行格式轉換,這會降低效能。

適用於

WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette)

初始化一個新的類別實例 WriteableBitmap ,並以指定參數進行。

public:
 WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System::Windows::Media::PixelFormat pixelFormat, System::Windows::Media::Imaging::BitmapPalette ^ palette);
[System.Security.SecurityCritical]
public WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System.Windows.Media.PixelFormat pixelFormat, System.Windows.Media.Imaging.BitmapPalette palette);
public WriteableBitmap(int pixelWidth, int pixelHeight, double dpiX, double dpiY, System.Windows.Media.PixelFormat pixelFormat, System.Windows.Media.Imaging.BitmapPalette palette);
[<System.Security.SecurityCritical>]
new System.Windows.Media.Imaging.WriteableBitmap : int * int * double * double * System.Windows.Media.PixelFormat * System.Windows.Media.Imaging.BitmapPalette -> System.Windows.Media.Imaging.WriteableBitmap
new System.Windows.Media.Imaging.WriteableBitmap : int * int * double * double * System.Windows.Media.PixelFormat * System.Windows.Media.Imaging.BitmapPalette -> System.Windows.Media.Imaging.WriteableBitmap
Public Sub New (pixelWidth As Integer, pixelHeight As Integer, dpiX As Double, dpiY As Double, pixelFormat As PixelFormat, palette As BitmapPalette)

參數

pixelWidth
Int32

點陣圖的期望寬度。

pixelHeight
Int32

點陣圖的期望高度。

dpiX
Double

點陣圖的水平點數每英吋(dpi)。

dpiY
Double

點陣圖的垂直點數每英吋(dpi)。

pixelFormat
PixelFormat

點陣圖的部分 PixelFormat 。

palette
BitmapPalette

點陣圖的部分 BitmapPalette 。

屬性

備註

偏好的 pixelFormat 值為 Bgr32 和 Pbgra32。 這些格式原生支援,且不需格式轉換。 其他 pixelFormat 數值則需要每次影格更新都進行格式轉換,這會降低效能。

適用於