RectangleF.Implicit(Rectangle to RectangleF) 運算子
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 Rectangle 結構轉換成 RectangleF 結構。
public:
static operator System::Drawing::RectangleF(System::Drawing::Rectangle r);
public static implicit operator System.Drawing.RectangleF (System.Drawing.Rectangle r);
static member op_Implicit : System.Drawing.Rectangle -> System.Drawing.RectangleF
Public Shared Widening Operator CType (r As Rectangle) As RectangleF
參數
傳回
RectangleF 結構,該結構是從指定的 Rectangle 結構轉換而來。
範例
下列程式代碼範例示範如何使用 Implicit、 RectangleF和 Equality 成員。 此範例的設計目的是要與 Windows Form 搭配使用。 將此程式代碼貼到表單中,並在處理表單的事件時呼叫 ConvertRectangleToRectangleF
方法,並e
傳遞為 PaintEventArgs。Paint
System.Drawing.RectanglesAndPoints#6
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應