WriteableBitmap Konstruktorer

Definition

Initierar en ny instans av WriteableBitmap klassen.

Överlagringar

Name Description
WriteableBitmap(BitmapSource)

Initierar en ny instans av klassen med hjälp av WriteableBitmap den angivna BitmapSource.

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

Initierar en ny instans av WriteableBitmap klassen med de angivna parametrarna.

WriteableBitmap(BitmapSource)

Initierar en ny instans av klassen med hjälp av WriteableBitmap den angivna 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)

Parametrar

source
BitmapSource

Att BitmapSource använda för initiering.

Attribut

Kommentarer

Konstruktorn WriteableBitmap(Int32, Int32, Double, Double, PixelFormat, BitmapPalette) föredras framför att använda den här konstruktorn.

Om source inte använder ett bitmappsformat som stöds internt tillämpas formatkonverteringar för varje bildruteuppdatering, vilket minskar prestandan.

Gäller för

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

Initierar en ny instans av WriteableBitmap klassen med de angivna parametrarna.

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)

Parametrar

pixelWidth
Int32

Den önskade bredden på bitmappen.

pixelHeight
Int32

Önskad höjd för bitmappen.

dpiX
Double

Bitmappens vågräta punkter per tum (dpi).

dpiY
Double

Bitmappens lodräta punkter per tum (dpi).

pixelFormat
PixelFormat

Bitmappens PixelFormat .

palette
BitmapPalette

Bitmappens BitmapPalette .

Attribut

Kommentarer

De önskade värdena för pixelFormat är Bgr32 och Pbgra32. Dessa format stöds internt och kräver ingen formatkonvertering. Andra pixelFormat värden kräver en formatkonvertering för varje ramuppdatering, vilket minskar prestandan.

Gäller för