共用方式為


IDCompositionRotateTransform::SetCenterY (float) 方法 (dcomp.h)

變更 2D 旋轉轉換的 CenterY 屬性值。 CenterY 屬性會指定執行旋轉之點的 Y 座標。

語法

HRESULT SetCenterY(
  [in] float centerY
);

參數

[in] centerY

類型: float

中心點的新 Y 座標。

傳回值

類型: HRESULT

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

備註

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

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

規格需求

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

另請參閱

IDCompositionRotateTransform

IDCompositionRotateTransform::SetCenterX