Region.Intersect 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.
Aşırı Yüklemeler
Intersect(GraphicsPath) |
Bunu Region belirtilen GraphicsPathile kendi kesişimine Güncelleştirmeler. |
Intersect(Rectangle) |
BunuRegion, belirtilen Rectangle yapıyla kendi kesişimine Güncelleştirmeler. |
Intersect(RectangleF) |
BunuRegion, belirtilen RectangleF yapıyla kendi kesişimine Güncelleştirmeler. |
Intersect(Region) |
Bunu Region belirtilen Regionile kendi kesişimine Güncelleştirmeler. |
Intersect(GraphicsPath)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
Bunu Region belirtilen GraphicsPathile kendi kesişimine Güncelleştirmeler.
public:
void Intersect(System::Drawing::Drawing2D::GraphicsPath ^ path);
public void Intersect (System.Drawing.Drawing2D.GraphicsPath path);
member this.Intersect : System.Drawing.Drawing2D.GraphicsPath -> unit
Public Sub Intersect (path As GraphicsPath)
Parametreler
- path
- GraphicsPath
GraphicsPath bu Regionile kesişecek .
Örnekler
Kod örnekleri için ve Complement(GraphicsPath) yöntemlerine RectangleF.Intersect(RectangleF) bakın.
Şunlara uygulanır
Intersect(Rectangle)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Intersect(System::Drawing::Rectangle rect);
public void Intersect (System.Drawing.Rectangle rect);
member this.Intersect : System.Drawing.Rectangle -> unit
Public Sub Intersect (rect As Rectangle)
Parametreler
Örnekler
Kod örneği için yöntemine Intersect(RectangleF) bakın.
Şunlara uygulanır
Intersect(RectangleF)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
BunuRegion, belirtilen RectangleF yapıyla kendi kesişimine Güncelleştirmeler.
public:
void Intersect(System::Drawing::RectangleF rect);
public void Intersect (System.Drawing.RectangleF rect);
member this.Intersect : System.Drawing.RectangleF -> unit
Public Sub Intersect (rect As RectangleF)
Parametreler
- rect
- RectangleF
Bu RectangleFRegionile kesişecek yapı.
Örnekler
Aşağıdaki kod örneği, Windows Forms ile kullanılmak üzere tasarlanmıştır ve olay işleyicisinin bir parametresi olan öğesini gerektirirPaintEventArgse
.Paint Kod aşağıdaki eylemleri gerçekleştirir:
İlk dikdörtgeni oluşturur ve siyah olarak ekrana çizer.
İkinci dikdörtgeni oluşturur ve kırmızıyla ekrana çizer.
İlk dikdörtgenden bir bölge oluşturur.
İkinci dikdörtgenle birleştirildiğinde bölge için kesişim alanını alır.
Kesişim alanını maviyle doldurur ve ekrana çizer.
Bölge ve dikdörtgen için yalnızca çakışan alanın mavi olduğuna dikkat edin.
public:
void Intersect_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 complementRect = RectangleF(90,30,100,100);
e->Graphics->DrawRectangle( Pens::Red, Rectangle::Round( complementRect ) );
// Create a region using the first rectangle.
System::Drawing::Region^ myRegion = gcnew System::Drawing::Region( regionRect );
// Get the area of intersection for myRegion when combined with
// complementRect.
myRegion->Intersect( complementRect );
// Fill the intersection area of myRegion with blue.
SolidBrush^ myBrush = gcnew SolidBrush( Color::Blue );
e->Graphics->FillRegion( myBrush, myRegion );
}
public void Intersect_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 complementRect = new RectangleF(90, 30, 100, 100);
e.Graphics.DrawRectangle(Pens.Red,
Rectangle.Round(complementRect));
// Create a region using the first rectangle.
Region myRegion = new Region(regionRect);
// Get the area of intersection for myRegion when combined with
// complementRect.
myRegion.Intersect(complementRect);
// Fill the intersection area of myRegion with blue.
SolidBrush myBrush = new SolidBrush(Color.Blue);
e.Graphics.FillRegion(myBrush, myRegion);
}
Public Sub Intersect_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 complementRect As New RectangleF(90, 30, 100, 100)
e.Graphics.DrawRectangle(Pens.Red, _
Rectangle.Round(complementRect))
' Create a region using the first rectangle.
Dim myRegion As New [Region](regionRect)
' Get the area of intersection for myRegion when combined with
' complementRect.
myRegion.Intersect(complementRect)
' 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
Intersect(Region)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Intersect(System::Drawing::Region ^ region);
public void Intersect (System.Drawing.Region region);
member this.Intersect : System.Drawing.Region -> unit
Public Sub Intersect (region As Region)
Parametreler
Örnekler
Kod örnekleri için bkz Intersect(RectangleF) . ve Complement(GraphicsPath) yöntemi.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin