Region コンストラクタ (Rectangle)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
解説
使用例
Region コンストラクタと MakeEmpty メソッドの使用方法を示すコード例を次に示します。この例は、Windows フォームでの使用を意図してデザインされています。フォームを作成し、次のコードを貼り付けます。フォームの Paint イベント処理メソッドで FillEmptyRegion メソッドを呼び出し、e を PaintEventArgs として渡します。
Private Sub FillEmptyRegion(ByVal e As PaintEventArgs) ' Create a region from a rectangle. Dim originalRectangle As New Rectangle(40, 40, 40, 50) Dim smallRegion As New Region(originalRectangle) ' Call MakeEmpty. smallRegion.MakeEmpty() ' Fill the region in red and draw the original rectangle ' in black. Note there is nothing filled in. e.Graphics.FillRegion(Brushes.Red, smallRegion) e.Graphics.DrawRectangle(Pens.Black, originalRectangle) End Sub
private void FillEmptyRegion(PaintEventArgs e) { // Create a region from a rectangle. Rectangle originalRectangle = new Rectangle(40, 40, 40, 50); Region smallRegion = new Region(originalRectangle); // Call MakeEmpty. smallRegion.MakeEmpty(); // Fill the region in red and draw the original rectangle // in black. Note there is nothing filled in. e.Graphics.FillRegion(Brushes.Red, smallRegion); e.Graphics.DrawRectangle(Pens.Black, originalRectangle); }
private: void FillEmptyRegion( PaintEventArgs^ e ) { // Create a region from a rectangle. Rectangle originalRectangle = Rectangle(40,40,40,50); System::Drawing::Region^ smallRegion = gcnew System::Drawing::Region( originalRectangle ); // Call MakeEmpty. smallRegion->MakeEmpty(); // Fill the region in red and draw the original rectangle // in black. Note there is nothing filled in. e->Graphics->FillRegion( Brushes::Red, smallRegion ); e->Graphics->DrawRectangle( Pens::Black, originalRectangle ); }
private void FillEmptyRegion(PaintEventArgs e) { // Create a region from a rectangle. Rectangle originalRectangle = new Rectangle(40, 40, 40, 50); Region smallRegion = new Region(originalRectangle); // Call MakeEmpty. smallRegion.MakeEmpty(); // Fill the region in red and draw the original rectangle // in black. Note there is nothing filled in. e.get_Graphics().FillRegion(Brushes.get_Red(), smallRegion); e.get_Graphics().DrawRectangle(Pens.get_Black(), originalRectangle); } //FillEmptyRegion
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Region コンストラクタ (RegionData)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
例外
解説
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Region コンストラクタ (RectangleF)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
解説
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Region コンストラクタ
オーバーロードの一覧
名前 | 説明 |
---|---|
Region () | 新しい Region を初期化します。 .NET Compact Framework によってサポートされています。 |
Region (GraphicsPath) | 指定した GraphicsPath を使用して、新しい Region を初期化します。 |
Region (Rectangle) | 指定の Rectangle 構造体から新しい Region を初期化します。 .NET Compact Framework によってサポートされています。 |
Region (RectangleF) | 指定の RectangleF 構造体から新しい Region を初期化します。 |
Region (RegionData) | 指定のデータから新しい Region を初期化します。 |
Region コンストラクタ (GraphicsPath)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
例外
解説
プラットフォーム
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Region コンストラクタ ()
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
プラットフォーム
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
Weblioに収録されているすべての辞書からRegion コンストラクタを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からRegion コンストラクタを検索
- Region コンストラクタのページへのリンク