Share via


D3DImage.PixelWidth Proprietà

Definizione

Ottiene la larghezza di D3DImage espressa in pixel.

public:
 property int PixelWidth { int get(); };
public int PixelWidth { get; }
member this.PixelWidth : int
Public ReadOnly Property PixelWidth As Integer

Valore della proprietà

Larghezza di D3DImage espressa in pixel.

Esempio

Nell'esempio di codice seguente viene illustrato come usare la PixelWidth proprietà per specificare l'area modificata nel buffer back. Per altre informazioni, vedere Procedura dettagliata: Hosting di contenuto Direct3D9 in WPF.

d3dimg.Lock();
// Repeatedly calling SetBackBuffer with the same IntPtr is 
// a no-op. There is no performance penalty.
d3dimg.SetBackBuffer(D3DResourceType.IDirect3DSurface9, pSurface);
HRESULT.Check(Render());
d3dimg.AddDirtyRect(new Int32Rect(0, 0, d3dimg.PixelWidth, d3dimg.PixelHeight));
d3dimg.Unlock();

Commenti

Il valore di PixelWidth può cambiare quando viene assegnato un nuovo buffer back da una chiamata al SetBackBuffer metodo.

Si applica a

Vedi anche