共用方式為


IDCompositionRotateTransform3D::SetCenterZ (float) 方法 (dcomp.h)

變更 3D 旋轉轉換的 CenterZ 屬性值。 CenterZ 屬性會指定執行旋轉之點的 z 座標。 預設值為零。

語法

HRESULT SetCenterZ(
  [in] float centerZ
);

參數

[in] centerZ

類型: float

中心點的新 Z 座標。

傳回值

類型: HRESULT

如果函式成功,則會傳回S_OK。 否則,它會傳回 HRESULT 錯誤碼。 如需錯誤碼清單,請參閱 DirectComposition 錯誤碼

備註

如果 centerZ 參數為 NaN、正無限大或負無限大,這個方法就會失敗。

如果 CenterZ 屬性先前是動畫,這個方法會移除動畫,並將 CenterZ 屬性設定為指定的靜態值。

規格需求

需求
最低支援的用戶端 Windows 8 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2012 [僅限傳統型應用程式]
目標平台 Windows
標頭 dcomp.h
程式庫 Dcomp.lib
Dll Dcomp.dll

另請參閱

IDCompositionRotateTransform3D

IDCompositionRotateTransform3D::SetCenterX

IDCompositionRotateTransform3D::SetCenterY