TextureBrush Konstruktory

Definicja

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu.

Przeciążenia

TextureBrush(Image)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu.

TextureBrush(Image, WrapMode)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i trybu zawijania.

TextureBrush(Image, Rectangle)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i prostokąta ograniczenia.

TextureBrush(Image, RectangleF)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i prostokąta ograniczenia.

TextureBrush(Image, WrapMode, Rectangle)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, trybu zawijania i ograniczenia prostokąta.

TextureBrush(Image, WrapMode, RectangleF)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, trybu zawijania i ograniczenia prostokąta.

TextureBrush(Image, Rectangle, ImageAttributes)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, ograniczenia prostokąta i atrybutów obrazu.

TextureBrush(Image, RectangleF, ImageAttributes)

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, ograniczenia prostokąta i atrybutów obrazu.

TextureBrush(Image)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu.

public:
 TextureBrush(System::Drawing::Image ^ bitmap);
public TextureBrush (System.Drawing.Image bitmap);
new System.Drawing.TextureBrush : System.Drawing.Image -> System.Drawing.TextureBrush
Public Sub New (bitmap As Image)

Parametry

bitmap
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

Przykłady

W poniższym przykładzie kodu pokazano, jak uzyskać nową mapę bitową przy użyciu FromFile metody . Demonstruje również element TextureBrush.

Ten przykład jest przeznaczony do użycia z Windows Forms. Utwórz formularz zawierający przycisk o nazwie Button2. Wklej kod do formularza i skojarz metodę Button2_Click ze zdarzeniem przycisku Click .

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(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 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

Dotyczy

TextureBrush(Image, WrapMode)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i trybu zawijania.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::Drawing2D::WrapMode wrapMode);
public TextureBrush (System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.Drawing2D.WrapMode -> System.Drawing.TextureBrush
Public Sub New (image As Image, wrapMode As WrapMode)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

wrapMode
WrapMode

Wyliczenie WrapMode określające sposób kafelka tego TextureBrush obiektu.

Dotyczy

TextureBrush(Image, Rectangle)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i prostokąta ograniczenia.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::Rectangle dstRect);
public TextureBrush (System.Drawing.Image image, System.Drawing.Rectangle dstRect);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.Rectangle -> System.Drawing.TextureBrush
Public Sub New (image As Image, dstRect As Rectangle)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

dstRect
Rectangle

Rectangle Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

Dotyczy

TextureBrush(Image, RectangleF)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu i prostokąta ograniczenia.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::RectangleF dstRect);
public TextureBrush (System.Drawing.Image image, System.Drawing.RectangleF dstRect);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.RectangleF -> System.Drawing.TextureBrush
Public Sub New (image As Image, dstRect As RectangleF)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

dstRect
RectangleF

RectangleF Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

Dotyczy

TextureBrush(Image, WrapMode, Rectangle)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, trybu zawijania i ograniczenia prostokąta.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::Drawing2D::WrapMode wrapMode, System::Drawing::Rectangle dstRect);
public TextureBrush (System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode, System.Drawing.Rectangle dstRect);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.Drawing2D.WrapMode * System.Drawing.Rectangle -> System.Drawing.TextureBrush
Public Sub New (image As Image, wrapMode As WrapMode, dstRect As Rectangle)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

wrapMode
WrapMode

Wyliczenie WrapMode określające sposób kafelka tego TextureBrush obiektu.

dstRect
Rectangle

Rectangle Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

Dotyczy

TextureBrush(Image, WrapMode, RectangleF)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, trybu zawijania i ograniczenia prostokąta.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::Drawing2D::WrapMode wrapMode, System::Drawing::RectangleF dstRect);
public TextureBrush (System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode, System.Drawing.RectangleF dstRect);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.Drawing2D.WrapMode * System.Drawing.RectangleF -> System.Drawing.TextureBrush
Public Sub New (image As Image, wrapMode As WrapMode, dstRect As RectangleF)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

wrapMode
WrapMode

Wyliczenie WrapMode określające sposób kafelka tego TextureBrush obiektu.

dstRect
RectangleF

RectangleF Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

Dotyczy

TextureBrush(Image, Rectangle, ImageAttributes)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, ograniczenia prostokąta i atrybutów obrazu.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::Rectangle dstRect, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public TextureBrush (System.Drawing.Image image, System.Drawing.Rectangle dstRect, System.Drawing.Imaging.ImageAttributes imageAttr);
public TextureBrush (System.Drawing.Image image, System.Drawing.Rectangle dstRect, System.Drawing.Imaging.ImageAttributes? imageAttr);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.Imaging.ImageAttributes -> System.Drawing.TextureBrush
Public Sub New (image As Image, dstRect As Rectangle, imageAttr As ImageAttributes)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

dstRect
Rectangle

Rectangle Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

imageAttr
ImageAttributes

ImageAttributes Obiekt zawierający dodatkowe informacje o obrazie używanym przez ten TextureBrush obiekt.

Dotyczy

TextureBrush(Image, RectangleF, ImageAttributes)

Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs
Źródło:
TextureBrush.cs

Inicjuje nowy TextureBrush obiekt, który używa określonego obrazu, ograniczenia prostokąta i atrybutów obrazu.

public:
 TextureBrush(System::Drawing::Image ^ image, System::Drawing::RectangleF dstRect, System::Drawing::Imaging::ImageAttributes ^ imageAttr);
public TextureBrush (System.Drawing.Image image, System.Drawing.RectangleF dstRect, System.Drawing.Imaging.ImageAttributes imageAttr);
public TextureBrush (System.Drawing.Image image, System.Drawing.RectangleF dstRect, System.Drawing.Imaging.ImageAttributes? imageAttr);
new System.Drawing.TextureBrush : System.Drawing.Image * System.Drawing.RectangleF * System.Drawing.Imaging.ImageAttributes -> System.Drawing.TextureBrush
Public Sub New (image As Image, dstRect As RectangleF, imageAttr As ImageAttributes)

Parametry

image
Image

Image Obiekt, z którym ten TextureBrush obiekt wypełnia wnętrza.

dstRect
RectangleF

RectangleF Struktura reprezentująca prostokąt ograniczenia dla tego TextureBrush obiektu.

imageAttr
ImageAttributes

ImageAttributes Obiekt zawierający dodatkowe informacje o obrazie używanym przez ten TextureBrush obiekt.

Dotyczy