長方形を作成してキャスト Rectangle and RectangleF are useful features provided by IronDrawing which can be used to crop any image file. Customers using rectangles from System.Drawing.Rectangle or System.Drawing.RectangleF can also cast them to IronSoftware.Drawing.Rectangle and IronSoftware.Drawing.RectangleF using the Cast method. Create Rectangle & RectangleF To create a Rectangle, users can instantiate a new Rectangle and provide the X and Y coordinates, as well as the width and height measurement of the Rectangle in pixels. For example: Similarly, for the RectangleF class, a sample RectangleF object can be instantiated as follows: Cast Rectangle & RectangleF To cast an IronSoftware.Drawing.Rectangle from System.Drawing.Rectangle or an IronSoftware.Drawing.RectangleF from System.Drawing.RectangleF, you can use implicit conversion. Here's how you can do it: In this example, we use implicit conversion to cast System.Drawing.Rectangle and System.Drawing.RectangleF to their IronSoftware.Drawing counterparts, making it straightforward to utilize these rectangles in IronDrawing's features. 関連ドキュメントリンク Githubで見る 関連チュートリアル 関連ハウツーガイド クラスドキュメンテーション IronDrawing DLLをダウンロード Report an Issue on this page 準備はいいですか? Nuget ダウンロード 13,318,306 | バージョン: 2025.3 ただ今リリースされました 試用ライセンスキーがメールで送信されました。 総ダウンロード数: 13,318,306 ライセンスを見る