<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2F2D%2FRegion</id>
		<title>Csharp/CSharp Tutorial/2D/Region - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://nfex.ru/index.php?action=history&amp;feed=atom&amp;title=Csharp%2FCSharp_Tutorial%2F2D%2FRegion"/>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/2D/Region&amp;action=history"/>
		<updated>2026-04-30T00:11:34Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/2D/Region&amp;diff=6332&amp;oldid=prev</id>
		<title> в 15:31, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/2D/Region&amp;diff=6332&amp;oldid=prev"/>
				<updated>2010-05-26T15:31:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 15:31, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/2D/Region&amp;diff=6333&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://nfex.ru/index.php?title=Csharp/CSharp_Tutorial/2D/Region&amp;diff=6333&amp;oldid=prev"/>
				<updated>2010-05-26T12:18:46Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Create an irregular Region add a circle to the region==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Drawing.Drawing2D;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form {&lt;br /&gt;
    protected override void OnPaint(PaintEventArgs e) {&lt;br /&gt;
        Graphics g = e.Graphics;&lt;br /&gt;
        g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
        Region reg = new Region();&lt;br /&gt;
        reg.MakeEmpty();&lt;br /&gt;
        GraphicsPath gp = new GraphicsPath();&lt;br /&gt;
        gp.AddEllipse(10, 10, 50, 50);&lt;br /&gt;
        reg.Union(gp);&lt;br /&gt;
        gp.Reset();&lt;br /&gt;
        gp.AddLine(40, 40, 70, 10);&lt;br /&gt;
        gp.AddLine(70, 10, 100, 40);&lt;br /&gt;
        gp.CloseFigure();&lt;br /&gt;
        reg.Union(gp);&lt;br /&gt;
        reg.Union(new Rectangle(40, 50, 60, 60));&lt;br /&gt;
        g.SetClip(reg, CombineMode.Replace);&lt;br /&gt;
        g.FillRectangle(Brushes.Green, this.ClientRectangle);&lt;br /&gt;
        gp.Dispose();&lt;br /&gt;
        reg.Dispose();&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create a Region object, cut a rectangular hole in it, and fill it==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Drawing.Drawing2D;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form {&lt;br /&gt;
    protected override void OnPaint(PaintEventArgs e) {&lt;br /&gt;
    Graphics g = e.Graphics;&lt;br /&gt;
    g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
    Region r = new Region(new Rectangle(30, 30, 30, 60));&lt;br /&gt;
    r.Exclude(new Rectangle(40, 40, 10, 10));&lt;br /&gt;
    g.FillRegion(Brushes.Orange, r);&lt;br /&gt;
    Console.WriteLine(&amp;quot;This Region: &amp;quot;);&lt;br /&gt;
    Console.WriteLine(r.IsInfinite(g) ? &amp;quot; - is infinite&amp;quot; : &amp;quot; - is finite&amp;quot;);&lt;br /&gt;
    Console.WriteLine(r.IsEmpty(g) ? &amp;quot; - is empty&amp;quot; : &amp;quot; - is non-empty&amp;quot;);&lt;br /&gt;
    PointF pf = new PointF(35.0f, 30.0f);&lt;br /&gt;
    Console.WriteLine((r.IsVisible(pf) ? &amp;quot; - includes&amp;quot; : &amp;quot; - excludes&amp;quot;) + &amp;quot; the point (35.0, 50.0)&amp;quot;);&lt;br /&gt;
    Rectangle rect = new Rectangle(25, 65, 15, 15);&lt;br /&gt;
    g.DrawRectangle(Pens.Black, rect);&lt;br /&gt;
    Console.WriteLine((r.IsVisible(rect) ? &amp;quot; - is visible&amp;quot; : &amp;quot; - is invisible&amp;quot;) + &amp;quot; in the rectangle shown&amp;quot;);&lt;br /&gt;
    r.Dispose();&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Create a Region whose boundary is the above GraphicsPath==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Drawing.Drawing2D;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
public class Form1 : Form {&lt;br /&gt;
    protected override void OnPaint(PaintEventArgs e) {&lt;br /&gt;
    Graphics g = e.Graphics;&lt;br /&gt;
    g.FillRectangle(Brushes.White, this.ClientRectangle);&lt;br /&gt;
    GraphicsPath gp = new GraphicsPath();&lt;br /&gt;
    gp.AddLine(10, 10, 10, 50);&lt;br /&gt;
    gp.AddLine(10, 50, 50, 50);&lt;br /&gt;
    gp.AddLine(50, 50, 50, 10);&lt;br /&gt;
    gp.StartFigure();&lt;br /&gt;
    gp.AddLine(60, 10, 60, 50);&lt;br /&gt;
    gp.AddLine(60, 50, 100, 50);&lt;br /&gt;
    gp.AddLine(100, 50, 100, 10);&lt;br /&gt;
    gp.CloseFigure();&lt;br /&gt;
    Rectangle r = new Rectangle(110, 10, 40, 40);&lt;br /&gt;
    gp.AddEllipse(r);&lt;br /&gt;
    Region reg = new Region(gp);&lt;br /&gt;
    g.FillRegion(Brushes.Green, reg);&lt;br /&gt;
    reg.Dispose();&lt;br /&gt;
    gp.Dispose();&lt;br /&gt;
    }&lt;br /&gt;
    public static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Region.IsVisible==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;using System;&lt;br /&gt;
using System.Drawing;&lt;br /&gt;
using System.Collections;&lt;br /&gt;
using System.ruponentModel;&lt;br /&gt;
using System.Windows.Forms;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Drawing.Drawing2D;&lt;br /&gt;
public class Form1 : System.Windows.Forms.Form {&lt;br /&gt;
    private System.Windows.Forms.Label label1;&lt;br /&gt;
    GraphicsPath gP;&lt;br /&gt;
    string mes = &amp;quot;Move to the big I!&amp;quot;;&lt;br /&gt;
    FontFamily fF = new FontFamily(&amp;quot;Times new roman&amp;quot;);&lt;br /&gt;
    public Form1() {&lt;br /&gt;
        this.label1 = new System.Windows.Forms.Label();&lt;br /&gt;
        this.SuspendLayout();&lt;br /&gt;
        this.label1.Location = new System.Drawing.Point(88, 16);&lt;br /&gt;
        this.label1.Size = new System.Drawing.Size(160, 23);&lt;br /&gt;
        this.label1.Text = &amp;quot;label1&amp;quot;;&lt;br /&gt;
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&lt;br /&gt;
        this.ClientSize = new System.Drawing.Size(292, 109);&lt;br /&gt;
        this.Controls.AddRange(new System.Windows.Forms.Control[] { this.label1 });&lt;br /&gt;
        this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove);&lt;br /&gt;
        this.ResumeLayout(false);&lt;br /&gt;
        Graphics g = this.CreateGraphics();&lt;br /&gt;
        label1.Text = mes;&lt;br /&gt;
        string s = &amp;quot;I&amp;quot;;&lt;br /&gt;
        int fSt = (int)FontStyle.Regular;&lt;br /&gt;
        Point xy = new Point(50, 10);&lt;br /&gt;
        StringFormat sFr = StringFormat.GenericDefault;&lt;br /&gt;
        gP = new GraphicsPath();&lt;br /&gt;
        gP.AddString(s, fF, fSt, 50, xy, sFr);&lt;br /&gt;
    }&lt;br /&gt;
    [STAThread]&lt;br /&gt;
    static void Main() {&lt;br /&gt;
        Application.Run(new Form1());&lt;br /&gt;
    }&lt;br /&gt;
    protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) {&lt;br /&gt;
        Graphics g = this.CreateGraphics();&lt;br /&gt;
        g.DrawPath(Pens.Black, gP);  // draw the path to the surface&lt;br /&gt;
        g.Dispose();&lt;br /&gt;
    }&lt;br /&gt;
    private void Form1_MouseMove(object sender, MouseEventArgs e) {&lt;br /&gt;
        Region reg = new Region(gP);&lt;br /&gt;
        if (reg.IsVisible(new Point(e.X, e.Y)))&lt;br /&gt;
            mes = &amp;quot;in&amp;quot;;&lt;br /&gt;
        else&lt;br /&gt;
            mes = &amp;quot;Move to the big I!&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>