D3DImage.PixelHeight 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 D3DImage的高度,以像素為單位。
public:
property int PixelHeight { int get(); };
public int PixelHeight { get; }
member this.PixelHeight : int
Public ReadOnly Property PixelHeight As Integer
屬性值
D3DImage 的高度,以像素為單位。
範例
下列程式碼範例示範如何使用 PixelHeight 屬性在後端緩衝區中指定已變更的區域。 如需詳細資訊,請參閱 逐步解說:在 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();
備註
當呼叫 SetBackBuffer 方法指派新的後端緩衝區時,的值 PixelHeight 可能會變更。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應