Region.Union Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Bunu Region kendi ve belirtilen GraphicsPathbirleşimiyle güncelleştirir.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| Union(GraphicsPath) |
Bunu Region kendi ve belirtilen GraphicsPathbirleşimiyle güncelleştirir. |
| Union(Rectangle) |
Bu Region , kendisini ve belirtilen Rectangle yapısının birleşimine güncelleştirir. |
| Union(RectangleF) |
Bu Region , kendisini ve belirtilen RectangleF yapısının birleşimine güncelleştirir. |
| Union(Region) |
Bunu Region kendi ve belirtilen Regionbirleşimiyle güncelleştirir. |
Union(GraphicsPath)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
Bunu Region kendi ve belirtilen GraphicsPathbirleşimiyle güncelleştirir.
public:
void Union(System::Drawing::Drawing2D::GraphicsPath ^ path);
public void Union(System.Drawing.Drawing2D.GraphicsPath path);
member this.Union : System.Drawing.Drawing2D.GraphicsPath -> unit
Public Sub Union (path As GraphicsPath)
Parametreler
- path
- GraphicsPath
GraphicsPath ile Regionbirleşin.
Özel durumlar
path, null'e eşittir.
Örnekler
Kod örneği için ve Union(RectangleF) yöntemlerine Complement(GraphicsPath) bakın.
Şunlara uygulanır
Union(Rectangle)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Union(System::Drawing::Rectangle rect);
public void Union(System.Drawing.Rectangle rect);
member this.Union : System.Drawing.Rectangle -> unit
Public Sub Union (rect As Rectangle)
Parametreler
Örnekler
Kod örneği için yöntemine Union(RectangleF) bakın.
Şunlara uygulanır
Union(RectangleF)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
Bu Region , kendisini ve belirtilen RectangleF yapısının birleşimine güncelleştirir.
public:
void Union(System::Drawing::RectangleF rect);
public void Union(System.Drawing.RectangleF rect);
member this.Union : System.Drawing.RectangleF -> unit
Public Sub Union (rect As RectangleF)
Parametreler
- rect
- RectangleF
Bu RectangleFRegionile birleşecek yapı.
Örnekler
Aşağıdaki kod örneği Windows Forms ile kullanılmak üzere tasarlanmıştır ve PaintEventArgse gerektirir. Kod aşağıdaki eylemleri gerçekleştirir:
İlk dikdörtgeni oluşturur ve siyah olarak ekrana çizer.
İkinci bir dikdörtgen oluşturur ve kırmızı renkli olarak ekrana çizer.
İlk dikdörtgeni kullanarak bir bölge oluşturur.
ile
myRegionbirleştirildiğinde içincomplementRectbirleşim alanını alır.Birleşim alanını mavi ile doldurur ve ekrana çizer.
Her iki dikdörtgenin de çakışma alanı dahil olmak üzere maviyle doldurulduğuna dikkat edin.
void Union_RectF_Example( PaintEventArgs^ e )
{
// Create the first rectangle and draw it to the screen in black.
Rectangle regionRect = Rectangle(20,20,100,100);
e->Graphics->DrawRectangle( Pens::Black, regionRect );
// create the second rectangle and draw it to the screen in red.
RectangleF unionRect = RectangleF(90,30,100,100);
e->Graphics->DrawRectangle( Pens::Red, Rectangle::Round( unionRect ) );
// Create a region using the first rectangle.
System::Drawing::Region^ myRegion = gcnew System::Drawing::Region( regionRect );
// Get the area of union for myRegion when combined with
// complementRect.
myRegion->Union( unionRect );
// Fill the union area of myRegion with blue.
SolidBrush^ myBrush = gcnew SolidBrush( Color::Blue );
e->Graphics->FillRegion( myBrush, myRegion );
}
public void Union_RectF_Example(PaintEventArgs e)
{
// Create the first rectangle and draw it to the screen in black.
Rectangle regionRect = new Rectangle(20, 20, 100, 100);
e.Graphics.DrawRectangle(Pens.Black, regionRect);
// create the second rectangle and draw it to the screen in red.
RectangleF unionRect = new RectangleF(90, 30, 100, 100);
e.Graphics.DrawRectangle(Pens.Red,
Rectangle.Round(unionRect));
// Create a region using the first rectangle.
Region myRegion = new Region(regionRect);
// Get the area of union for myRegion when combined with
// complementRect.
myRegion.Union(unionRect);
// Fill the union area of myRegion with blue.
SolidBrush myBrush = new SolidBrush(Color.Blue);
e.Graphics.FillRegion(myBrush, myRegion);
}
Public Sub Union_RectF_Example(ByVal e As PaintEventArgs)
' Create the first rectangle and draw it to the screen in black.
Dim regionRect As New Rectangle(20, 20, 100, 100)
e.Graphics.DrawRectangle(Pens.Black, regionRect)
' create the second rectangle and draw it to the screen in red.
Dim unionRect As New RectangleF(90, 30, 100, 100)
e.Graphics.DrawRectangle(Pens.Red, Rectangle.Round(unionRect))
' Create a region using the first rectangle.
Dim myRegion As New [Region](regionRect)
' Get the area of union for myRegion when combined with
' complementRect.
myRegion.Union(unionRect)
' Fill the intersection area of myRegion with blue.
Dim myBrush As New SolidBrush(Color.Blue)
e.Graphics.FillRegion(myBrush, myRegion)
End Sub
Şunlara uygulanır
Union(Region)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Union(System::Drawing::Region ^ region);
public void Union(System.Drawing.Region region);
member this.Union : System.Drawing.Region -> unit
Public Sub Union (region As Region)
Parametreler
Özel durumlar
region, null'e eşittir.
Örnekler
Kod örneği için ve Union(RectangleF) yöntemine Complement(GraphicsPath) bakın.