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