Region.Xor 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.
Bu Region nesneyi, belirtilen GraphicsPath nesneyle kendi kesişimini çıkararak birleşime Güncelleştirmeler.
Aşırı Yüklemeler
Xor(GraphicsPath) |
Region Bunu, belirtilen GraphicsPathile kendi kesişimini çıkararak birleşime Güncelleştirmeler. |
Xor(Rectangle) |
BunuRegion, belirtilen Rectangle yapıyla kendi kesişimini çıkararak birleşime Güncelleştirmeler. |
Xor(RectangleF) |
BunuRegion, belirtilen RectangleF yapıyla kendi kesişimini çıkararak birleşime Güncelleştirmeler. |
Xor(Region) |
Region Bunu, belirtilen Regionile kendi kesişimini çıkararak birleşime Güncelleştirmeler. |
Xor(GraphicsPath)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
Region Bunu, belirtilen GraphicsPathile kendi kesişimini çıkararak birleşime Güncelleştirmeler.
public:
void Xor(System::Drawing::Drawing2D::GraphicsPath ^ path);
public void Xor (System.Drawing.Drawing2D.GraphicsPath path);
member this.Xor : System.Drawing.Drawing2D.GraphicsPath -> unit
Public Sub Xor (path As GraphicsPath)
Parametreler
- path
- GraphicsPath
GraphicsPath bu Regionile için Xor .
Özel durumlar
path
, null
değeridir.
Örnekler
Kod örneği için ve Complement(GraphicsPath) yöntemlerine Xor(RectangleF) bakın.
Şunlara uygulanır
Xor(Rectangle)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Xor(System::Drawing::Rectangle rect);
public void Xor (System.Drawing.Rectangle rect);
member this.Xor : System.Drawing.Rectangle -> unit
Public Sub Xor (rect As Rectangle)
Parametreler
Örnekler
Kod örneği için yöntemine Xor(RectangleF) bakın.
Şunlara uygulanır
Xor(RectangleF)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
BunuRegion, belirtilen RectangleF yapıyla kendi kesişimini çıkararak birleşime Güncelleştirmeler.
public:
void Xor(System::Drawing::RectangleF rect);
public void Xor (System.Drawing.RectangleF rect);
member this.Xor : System.Drawing.RectangleF -> unit
Public Sub Xor (rect As RectangleF)
Parametreler
- rect
- RectangleF
bu RectangleFRegionile yapısıXor(GraphicsPath).
Ö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 bir dikdörtgen oluşturur ve kırmızıyla ekrana çizer.
İlk dikdörtgeni kullanarak bir bölge oluşturur.
Xor ile
complementRect
birleştirildiğinde içinmyRegion
alanını alır.Xor Alanı maviyle doldurur ve ekrana çizer.
Çakışma alanı dışında her iki dikdörtgenin de maviyle doldurulduğuna dikkat edin.
void XorExample( 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 xorRect = RectangleF(90,30,100,100);
e->Graphics->DrawRectangle( Pens::Red, Rectangle::Round( xorRect ) );
// Create a region using the first rectangle.
System::Drawing::Region^ myRegion = gcnew System::Drawing::Region( regionRect );
// Get the area of overlap for myRegion when combined with
// complementRect.
myRegion->Xor( xorRect );
// Fill the Xor area of myRegion with blue.
SolidBrush^ myBrush = gcnew SolidBrush( Color::Blue );
e->Graphics->FillRegion( myBrush, myRegion );
}
public void XorExample(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 xorRect = new RectangleF(90, 30, 100, 100);
e.Graphics.DrawRectangle(Pens.Red,
Rectangle.Round(xorRect));
// Create a region using the first rectangle.
Region myRegion = new Region(regionRect);
// Get the area of overlap for myRegion when combined with
// complementRect.
myRegion.Xor(xorRect);
// Fill the Xor area of myRegion with blue.
SolidBrush myBrush = new SolidBrush(Color.Blue);
e.Graphics.FillRegion(myBrush, myRegion);
}
Public Sub XorExample(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 xorRect As New RectangleF(90, 30, 100, 100)
e.Graphics.DrawRectangle(Pens.Red, Rectangle.Round(xorRect))
' Create a region using the first rectangle.
Dim myRegion As New [Region](regionRect)
' Get the area of overlap for myRegion when combined with
' complementRect.
myRegion.Xor(xorRect)
' 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
Xor(Region)
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
- Kaynak:
- Region.cs
public:
void Xor(System::Drawing::Region ^ region);
public void Xor (System.Drawing.Region region);
member this.Xor : System.Drawing.Region -> unit
Public Sub Xor (region As Region)
Parametreler
Özel durumlar
region
, null
değeridir.
Örnekler
Kod örneği için ve Complement(GraphicsPath) yöntemlerine Xor(RectangleF) bakın.
Ş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