D3DImage.PixelWidth プロパティ

定義

D3DImage の幅 (ピクセル単位) を取得します。

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

プロパティ値

D3DImage の幅 (ピクセル単位)。

次のコード例は、 プロパティを使用 PixelWidth して、バック バッファー内の変更された領域を指定する方法を示しています。 詳細については、「チュートリアル:WPF での Direct3D9 コンテンツのホスト」を参照してください。

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();

注釈

の値は、 メソッドの PixelWidth 呼び出し SetBackBuffer によって新しいバック バッファーが割り当てられると変更される可能性があります。

適用対象

こちらもご覧ください