[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] Rectangle.Union
From: |
Marcus |
Subject: |
Re: [Pnet-developers] Rectangle.Union |
Date: |
Thu, 25 Aug 2005 03:23:14 -0500 |
User-agent: |
KMail/1.8.91 |
Gopal gives a more algorithmic reply, but essentially, Rectangle.Empty is a
Rectangle with x = 0, y = 0, h = 0, w = 0. Apparently, the API permits
rectangles of zero area.
So when you form the smallest rectangle that contains the Rectangle.Empty
(defined above) and the new Rectangle(1,1,1,1), you end up with the (0, 0, 2,
2) that you were surprised about.
On Thursday 25 August 2005 2:03 am, Miroslaw Dobrzanski-Neumann wrote:
> Hi,
>
> is this a bug or feature?
>
> using System.Drawing;
>
> Rectangle r = Rectangle.Union (Rectangle.Empty, new Rectangle (1,1,1,1));
> r is now
> {0, 0, 2, 2}
>
> I would expect
> {1, 1, 1, 1}
> because union with nothing an identity transform