TextureBrushとは? わかりやすく解説

TextureBrush クラス

TextureBrush クラスの各プロパティは、イメージ使用して形状内部塗りつぶす Brush オブジェクトです。このクラス継承できません。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public NotInheritable Class
 TextureBrush
    Inherits Brush
public sealed class TextureBrush : Brush
public final class TextureBrush extends Brush
public final class TextureBrush extends
 Brush
使用例使用例

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.Object
   System.MarshalByRefObject
     System.Drawing.Brush
      System.Drawing.TextureBrush
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image)

指定イメージ使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, WrapMode, Rectangle)

指定イメージラップ モード、および外接する四角形使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    wrapMode As WrapMode, _
    dstRect As Rectangle _
)
Dim image As Image
Dim wrapMode As WrapMode
Dim dstRect As Rectangle

Dim instance As New TextureBrush(image,
 wrapMode, dstRect)
public TextureBrush (
    Image image,
    WrapMode wrapMode,
    Rectangle dstRect
)
public:
TextureBrush (
    Image^ image, 
    WrapMode wrapMode, 
    Rectangle dstRect
)
public TextureBrush (
    Image image, 
    WrapMode wrapMode, 
    Rectangle dstRect
)
public function TextureBrush (
    image : Image, 
    wrapMode : WrapMode, 
    dstRect : Rectangle
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

wrapMode

TextureBrush オブジェクト並べ方を指定する WrapMode 列挙体。

dstRect

この TextureBrush オブジェクト外接する四角形を表す Rectangle 構造体

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, Rectangle)

指定したイメージおよび外接する四角形使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    dstRect As Rectangle _
)
Dim image As Image
Dim dstRect As Rectangle

Dim instance As New TextureBrush(image,
 dstRect)
public TextureBrush (
    Image image,
    Rectangle dstRect
)
public:
TextureBrush (
    Image^ image, 
    Rectangle dstRect
)
public TextureBrush (
    Image image, 
    Rectangle dstRect
)
public function TextureBrush (
    image : Image, 
    dstRect : Rectangle
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

dstRect

この TextureBrush オブジェクト外接する四角形を表す Rectangle 構造体

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, WrapMode, RectangleF)

指定イメージラップ モード、および外接する四角形使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    wrapMode As WrapMode, _
    dstRect As RectangleF _
)
Dim image As Image
Dim wrapMode As WrapMode
Dim dstRect As RectangleF

Dim instance As New TextureBrush(image,
 wrapMode, dstRect)
public TextureBrush (
    Image image,
    WrapMode wrapMode,
    RectangleF dstRect
)
public:
TextureBrush (
    Image^ image, 
    WrapMode wrapMode, 
    RectangleF dstRect
)
public TextureBrush (
    Image image, 
    WrapMode wrapMode, 
    RectangleF dstRect
)
public function TextureBrush (
    image : Image, 
    wrapMode : WrapMode, 
    dstRect : RectangleF
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

wrapMode

TextureBrush オブジェクト並べ方を指定する WrapMode 列挙体。

dstRect

この TextureBrush オブジェクト外接する四角形を表す RectangleF 構造体

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, Rectangle, ImageAttributes)

指定したイメージ外接する四角形、およびイメージ属性使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    dstRect As Rectangle, _
    imageAttr As ImageAttributes _
)
Dim image As Image
Dim dstRect As Rectangle
Dim imageAttr As ImageAttributes

Dim instance As New TextureBrush(image,
 dstRect, imageAttr)
public TextureBrush (
    Image image,
    Rectangle dstRect,
    ImageAttributes imageAttr
)
public:
TextureBrush (
    Image^ image, 
    Rectangle dstRect, 
    ImageAttributes^ imageAttr
)
public TextureBrush (
    Image image, 
    Rectangle dstRect, 
    ImageAttributes imageAttr
)
public function TextureBrush (
    image : Image, 
    dstRect : Rectangle, 
    imageAttr : ImageAttributes
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

dstRect

この TextureBrush オブジェクト外接する四角形を表す Rectangle 構造体

imageAttr

この TextureBrush オブジェクト使用されるイメージについての追加情報格納している ImageAttributes オブジェクト

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ

指定イメージ使用する新しい 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 クラス
TextureBrush メンバ
System.Drawing 名前空間

TextureBrush コンストラクタ (Image, RectangleF, ImageAttributes)

指定したイメージ外接する四角形、およびイメージ属性使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    dstRect As RectangleF, _
    imageAttr As ImageAttributes _
)
Dim image As Image
Dim dstRect As RectangleF
Dim imageAttr As ImageAttributes

Dim instance As New TextureBrush(image,
 dstRect, imageAttr)
public TextureBrush (
    Image image,
    RectangleF dstRect,
    ImageAttributes imageAttr
)
public:
TextureBrush (
    Image^ image, 
    RectangleF dstRect, 
    ImageAttributes^ imageAttr
)
public TextureBrush (
    Image image, 
    RectangleF dstRect, 
    ImageAttributes imageAttr
)
public function TextureBrush (
    image : Image, 
    dstRect : RectangleF, 
    imageAttr : ImageAttributes
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

dstRect

この TextureBrush オブジェクト外接する四角形を表す RectangleF 構造体

imageAttr

この TextureBrush オブジェクト使用されるイメージについての追加情報格納している ImageAttributes オブジェクト

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, WrapMode)

指定イメージラップ モード使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    wrapMode As WrapMode _
)
Dim image As Image
Dim wrapMode As WrapMode

Dim instance As New TextureBrush(image,
 wrapMode)
public TextureBrush (
    Image image,
    WrapMode wrapMode
)
public:
TextureBrush (
    Image^ image, 
    WrapMode wrapMode
)
public TextureBrush (
    Image image, 
    WrapMode wrapMode
)
public function TextureBrush (
    image : Image, 
    wrapMode : WrapMode
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

wrapMode

TextureBrush オブジェクト並べ方を指定する WrapMode 列挙体。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush コンストラクタ (Image, RectangleF)

指定したイメージおよび外接する四角形使用する新しTextureBrush オブジェクト初期化します。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub New ( _
    image As Image, _
    dstRect As RectangleF _
)
Dim image As Image
Dim dstRect As RectangleF

Dim instance As New TextureBrush(image,
 dstRect)
public TextureBrush (
    Image image,
    RectangleF dstRect
)
public:
TextureBrush (
    Image^ image, 
    RectangleF dstRect
)
public TextureBrush (
    Image image, 
    RectangleF dstRect
)
public function TextureBrush (
    image : Image, 
    dstRect : RectangleF
)

パラメータ

image

TextureBrush オブジェクト内部塗りつぶすために使用する Image オブジェクト

dstRect

この TextureBrush オブジェクト外接する四角形を表す RectangleF 構造体

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

TextureBrush プロパティ


TextureBrush メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Clone オーバーライドされます。 この TextureBrush オブジェクト同一コピー作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド Dispose  この Brush オブジェクトによって使用されているすべてのリソース解放します。 ( Brush から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 ( MarshalByRefObject から継承されます。)
パブリック メソッド MultiplyTransform オーバーロードされますTextureBrush オブジェクトローカル ジオメトリック変換を表す Matrix オブジェクトに、指定されMatrix オブジェクト指定され順序乗算ます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ResetTransform 対象TextureBrush オブジェクトTransform プロパティ単位行列リセットします。
パブリック メソッド RotateTransform オーバーロードされます指定した量だけこの TextureBrush オブジェクトローカル ジオメトリック変換回転します。このメソッド変換前に回転行います
パブリック メソッド ScaleTransform オーバーロードされます指定の量だけこの TextureBrush オブジェクトローカル ジオメトリック変換スケーリングます。このメソッド変換前にスケーリング行列適用します。
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
パブリック メソッド TranslateTransform オーバーロードされます指定の量だけ、この TextureBrush オブジェクトローカル ジオメトリック変換指定順序平行移動ます。
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

TextureBrush クラス
System.Drawing 名前空間

TextureBrush メンバ

TextureBrush クラスの各プロパティは、イメージ使用して形状内部塗りつぶす Brush オブジェクトです。このクラス継承できません。

TextureBrush データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Clone オーバーライドされます。 この TextureBrush オブジェクト同一コピー作成します
パブリック メソッド CreateObjRef  リモート オブジェクトとの通信使用するプロキシ生成必要な情報をすべて格納しているオブジェクト作成します。 (MarshalByRefObject から継承されます。)
パブリック メソッド Dispose  この Brush オブジェクトによって使用されているすべてのリソース解放します。 (Brush から継承されます。)
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetLifetimeService  対象インスタンス有効期間ポリシー制御する現在の有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド InitializeLifetimeService  対象インスタンス有効期間ポリシー制御する有効期間サービス オブジェクト取得します。 (MarshalByRefObject から継承されます。)
パブリック メソッド MultiplyTransform オーバーロードされますTextureBrush オブジェクトローカル ジオメトリック変換を表す Matrix オブジェクトに、指定されMatrix オブジェクト指定され順序乗算ます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ResetTransform 対象TextureBrush オブジェクトTransform プロパティ単位行列リセットします。
パブリック メソッド RotateTransform オーバーロードされます指定した量だけこの TextureBrush オブジェクトローカル ジオメトリック変換回転します。このメソッド変換前に回転行います
パブリック メソッド ScaleTransform オーバーロードされます指定の量だけこの TextureBrush オブジェクトローカル ジオメトリック変換スケーリングます。このメソッド変換前にスケーリング行列適用します。
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
パブリック メソッド TranslateTransform オーバーロードされます指定の量だけ、この TextureBrush オブジェクトローカル ジオメトリック変換指定順序平行移動ます。
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

TextureBrush クラス
System.Drawing 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からTextureBrushを検索した結果を表示しています。
Weblioに収録されているすべての辞書からTextureBrushを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からTextureBrush を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TextureBrush」の関連用語

TextureBrushのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TextureBrushのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS