System.Drawing.Region.Union C# (CSharp) Метод

Union() публичный Метод

Updates this Region to the union of itself and the specified GraphicsPath.
public Union ( GraphicsPath path ) : void
path System.Drawing.Drawing2D.GraphicsPath Path.
Результат void
        public void Union(GraphicsPath path)
        {
            var region = new Region(path);
            Union(region);
            region.Dispose();
        }

Same methods

Region::Union ( Rectangle rect ) : void
Region::Union ( RectangleF rect ) : void
Region::Union ( Region region ) : void

Usage Example

Пример #1
0
 /// <summary>
 /// Called when the form loads
 /// </summary>
 /// <param name="sender">what triggered the event</param>
 /// <param name="e">event args</param>
 private void MainForm_Load(object sender, EventArgs e)
 {
     // make cool shape
     Region r = new Region();
     GraphicsPath gp = new GraphicsPath();
     gp.AddEllipse(new Rectangle(0, 0, this.Width, this.Height));
     r.MakeEmpty();
     r.Union(gp);
     gp = new GraphicsPath();
     gp.AddRectangle(new Rectangle(this.Width / 2, 0, this.Width / 2, this.Height / 2));
     r.Union(gp);
     this.Region = r;
 }
All Usage Examples Of System.Drawing.Region::Union