語言

Matrix.IsIdentity 屬性

定義

會得到一個值,表示該 Matrix 結構是否為單位矩陣。

public:
 property bool IsIdentity { bool get(); };
public bool IsIdentity { get; }
member this.IsIdentity : bool
Public ReadOnly Property IsIdentity As Boolean

屬性值

true 若結構 Matrix 為單位矩陣;否則, false。 預設值為 true。

備註

單位矩陣在係數 [1,1]、[2,2]、[3,3] 中值為 1,其他係數為 0。 這與設定 M11 和 M22 對應於 1 和 M12、 M21、 OffsetX、 OffsetY 與 0。 在仿射矩陣中,這是 Windows Presentation Foundation (WPF) 用於 Matrix 結構的實作,係數 [3,1]、[3,2]、[3.3],分別隱含為 0,0,1。

欄 1 第2欄 欄位 3
1 0 0
0 1 0
0 0 1

對於單位矩陣, ToString 該方法回傳的是字串「Identity」,而非 的 Matrix係數。

適用於

另請參閱