TextureBrush クラス
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
使用例
FromFile メソッドを使用して、新しいビットマップを取得する方法を次のコード例に示します。TextureBrush の例も示します。
この例は、Windows フォームでの使用を意図してデザインされています。Button2 という名前のボタンを含むフォームを作成します。コードをフォームに貼り付け、Button2_Click メソッドをボタンの Click イベントに関連付けます。
Private Sub Button2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Try Dim image1 As Bitmap = _ CType(Image.FromFile("C:\Documents and Settings\" _ & "All Users\Documents\My Music\music.bmp", True), Bitmap) Dim texture As New TextureBrush(image1) texture.WrapMode = Drawing2D.WrapMode.Tile Dim formGraphics As Graphics = Me.CreateGraphics() formGraphics.FillEllipse(texture, _ New RectangleF(90.0F, 110.0F, 100, 100)) formGraphics.Dispose() Catch ex As System.IO.FileNotFoundException MessageBox.Show("There was an error opening the bitmap." _ & "Please check the path.") End Try End Sub
private void Button2_Click(System.Object sender, System.EventArgs e) { try { Bitmap image1 = (Bitmap) Image.FromFile(@"C:\Documents and Settings\" + @"All Users\Documents\My Music\music.bmp", true); TextureBrush texture = new TextureBrush(image1); texture.WrapMode = System.Drawing.Drawing2D.WrapMode.Tile; Graphics formGraphics = this.CreateGraphics(); formGraphics.FillEllipse(texture, new RectangleF(90.0F, 110.0F, 100, 100)); formGraphics.Dispose(); } catch(System.IO.FileNotFoundException) { MessageBox.Show("There was an error opening the bitmap." + "Please check the path."); } }
private: void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) { try { Bitmap^ image1 = dynamic_cast<Bitmap^>(Image::FromFile( "C:\\Documents and Settings\\" "All Users\\Documents\\My Music\\music.bmp", true )); TextureBrush^ texture = gcnew TextureBrush( image1 ); texture->WrapMode = System::Drawing::Drawing2D::WrapMode::Tile; Graphics^ formGraphics = this->CreateGraphics(); formGraphics->FillEllipse( texture, RectangleF(90.0F,110.0F,100,100) ); delete formGraphics; } catch ( System::IO::FileNotFoundException^ ) { MessageBox::Show( "There was an error opening the bitmap." "Please check the path." ); } }
private void button2_Click(Object sender, System.EventArgs e) { try { Bitmap image1 = ((Bitmap)(Image.FromFile( "C:\\Documents and Settings\\" + "All Users\\Documents\\My Music\\music.bmp", true))); TextureBrush texture = new TextureBrush(image1); texture.set_WrapMode(System.Drawing.Drawing2D.WrapMode.Tile); Graphics formGraphics = this.CreateGraphics(); formGraphics.FillEllipse(texture, new RectangleF(90, 110, 100,100)); formGraphics.Dispose(); } catch (System.IO.FileNotFoundException exp) { MessageBox.Show(("There was an error opening the bitmap." + "Please check the path.")); } } //button2_Click
System.MarshalByRefObject
System.Drawing.Brush
System.Drawing.TextureBrush
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
使用例
FromFile メソッドを使用して、新しいビットマップを取得する方法を次のコード例に示します。TextureBrush の例も示します。
この例は、Windows フォームでの使用を意図してデザインされています。Button2 という名前のボタンを含むフォームを作成します。コードをフォームに貼り付け、Button2_Click メソッドをボタンの Click イベントに関連付けます。
Private Sub Button2_Click(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles Button2.Click Try Dim image1 As Bitmap = _ CType(Image.FromFile("C:\Documents and Settings\" _ & "All Users\Documents\My Music\music.bmp", True), Bitmap) Dim texture As New TextureBrush(image1) texture.WrapMode = Drawing2D.WrapMode.Tile Dim formGraphics As Graphics = Me.CreateGraphics() formGraphics.FillEllipse(texture, _ New RectangleF(90.0F, 110.0F, 100, 100)) formGraphics.Dispose() Catch ex As System.IO.FileNotFoundException MessageBox.Show("There was an error opening the bitmap." _ & "Please check the path.") End Try End Sub
private void Button2_Click(System.Object sender, System.EventArgs e) { try { Bitmap image1 = (Bitmap) Image.FromFile(@"C:\Documents and Settings\" + @"All Users\Documents\My Music\music.bmp", true); TextureBrush texture = new TextureBrush(image1); texture.WrapMode = System.Drawing.Drawing2D.WrapMode.Tile; Graphics formGraphics = this.CreateGraphics(); formGraphics.FillEllipse(texture, new RectangleF(90.0F, 110.0F, 100, 100)); formGraphics.Dispose(); } catch(System.IO.FileNotFoundException) { MessageBox.Show("There was an error opening the bitmap." + "Please check the path."); } }
private: void Button2_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ ) { try { Bitmap^ image1 = dynamic_cast<Bitmap^>(Image::FromFile( "C:\\Documents and Settings\\" "All Users\\Documents\\My Music\\music.bmp", true )); TextureBrush^ texture = gcnew TextureBrush( image1 ); texture->WrapMode = System::Drawing::Drawing2D::WrapMode::Tile; Graphics^ formGraphics = this->CreateGraphics(); formGraphics->FillEllipse( texture, RectangleF(90.0F,110.0F,100,100) ); delete formGraphics; } catch ( System::IO::FileNotFoundException^ ) { MessageBox::Show( "There was an error opening the bitmap." "Please check the path." ); } }
private void button2_Click(Object sender, System.EventArgs e) { try { Bitmap image1 = ((Bitmap)(Image.FromFile( "C:\\Documents and Settings\\" + "All Users\\Documents\\My Music\\music.bmp", true))); TextureBrush texture = new TextureBrush(image1); texture.set_WrapMode(System.Drawing.Drawing2D.WrapMode.Tile); Graphics formGraphics = this.CreateGraphics(); formGraphics.FillEllipse(texture, new RectangleF(90, 110, 100,100)); formGraphics.Dispose(); } catch (System.IO.FileNotFoundException exp) { MessageBox.Show(("There was an error opening the bitmap." + "Please check the path.")); } } //button2_Click
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, WrapMode, Rectangle)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
Dim image As Image Dim wrapMode As WrapMode Dim dstRect As Rectangle Dim instance As New TextureBrush(image, wrapMode, dstRect)
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, Rectangle)
アセンブリ: 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, WrapMode, RectangleF)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
Dim image As Image Dim wrapMode As WrapMode Dim dstRect As RectangleF Dim instance As New TextureBrush(image, wrapMode, dstRect)
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, Rectangle, ImageAttributes)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
Dim image As Image Dim dstRect As Rectangle Dim imageAttr As ImageAttributes Dim instance As New TextureBrush(image, dstRect, imageAttr)
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ
オーバーロードの一覧
名前 | 説明 |
---|---|
TextureBrush (Image) | 指定のイメージを使用する新しい TextureBrush オブジェクトを初期化します。 .NET Compact Framework によってサポートされています。 |
TextureBrush (Image, Rectangle) | 指定したイメージおよび外接する四角形を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, RectangleF) | 指定したイメージおよび外接する四角形を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, WrapMode) | 指定のイメージとラップ モードを使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, Rectangle, ImageAttributes) | 指定したイメージ、外接する四角形、およびイメージ属性を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, RectangleF, ImageAttributes) | 指定したイメージ、外接する四角形、およびイメージ属性を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, WrapMode, Rectangle) | 指定のイメージ、ラップ モード、および外接する四角形を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush (Image, WrapMode, RectangleF) | 指定のイメージ、ラップ モード、および外接する四角形を使用する新しい TextureBrush オブジェクトを初期化します。 |
TextureBrush コンストラクタ (Image, RectangleF, ImageAttributes)
アセンブリ: System.Drawing (system.drawing.dll 内)
構文
Dim image As Image Dim dstRect As RectangleF Dim imageAttr As ImageAttributes Dim instance As New TextureBrush(image, dstRect, imageAttr)
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, WrapMode)
アセンブリ: 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush コンストラクタ (Image, 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
TextureBrush プロパティ
パブリック プロパティ
名前 | 説明 | |
---|---|---|
Transform | この TextureBrush オブジェクトに関連付けられたイメージのローカル ジオメトリック変換を定義する Matrix オブジェクトを取得または設定します。 | |
WrapMode | TextureBrush オブジェクトのラップ モードを示す WrapMode 列挙体を取得または設定します。 |
TextureBrush メソッド
パブリック メソッド
名前 | 説明 | |
---|---|---|
Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) | |
MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
TextureBrush メンバ
TextureBrush クラスの各プロパティは、イメージを使用して形状の内部を塗りつぶす Brush オブジェクトです。このクラスは継承できません。
TextureBrush データ型で公開されるメンバを以下の表に示します。
パブリック コンストラクタ
パブリック プロパティ
名前 | 説明 | |
---|---|---|
Transform | この TextureBrush オブジェクトに関連付けられたイメージのローカル ジオメトリック変換を定義する Matrix オブジェクトを取得または設定します。 | |
WrapMode | TextureBrush オブジェクトのラップ モードを示す WrapMode 列挙体を取得または設定します。 |
名前 | 説明 | |
---|---|---|
Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) | |
MemberwiseClone | オーバーロードされます。 ( MarshalByRefObject から継承されます。) |
Weblioに収録されているすべての辞書からTextureBrushを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からTextureBrush を検索
- TextureBrushのページへのリンク