dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] Rectangle.Union


From: Miroslaw Dobrzanski-Neumann
Subject: Re: [Pnet-developers] Rectangle.Union
Date: Thu, 25 Aug 2005 10:31:34 +0200
User-agent: Mutt/1.5.6i

On Thu, Aug 25, 2005 at 10:02:05AM +0200, Marc Haisenko wrote:
> On Thursday 25 August 2005 09:03, 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}
> 
> The behaviour on MS.NET is the same, so this is not a bug.

Very interesting implication.

> 
> > I would expect
> > {1, 1, 1, 1}
> > because union with nothing an identity transform
> 
> I'd expect that as well, but I guess .NET interprets the term 
> "Rectangle.Empty" differently than we humans do ;-)

>From the MSDN (http://msdn.microsoft.com)
Rectangle.Empty Field
Represents a Rectangle structure with its properties left uninitialized.

BTW. What does it mean uninitialized? On .NET everything is initialized. When
one however says uninitialized it should read as invalid or undefined.

So, you mustn't make computation with undefined. It's obvious a bug. So another
question. Should PNET and other implementations replicate a Bug?

Regards
-- 
Mirosław Dobrzański-Neumann
E-mail: address@hidden
-------  L E G A L    D I S C L A I M E R  ---------

Die Informationen in dieser Nachricht sind vertraulich 
und ausschliesslich fuer den Adressaten bestimmt. 
Kenntnisnahme durch Dritte ist unzulaessig. Die 
Erstellung von Kopien oder das Weiterleiten an weitere, 
nicht originaere und benannte Adressaten ist nicht 
vorgesehen und kann ungesetzlich sein. Die Meinungen 
in dieser Nachricht stellen lediglich die Meinungen 
des Senders dar. Falls Sie vermuten, dass diese 
Nachricht veraendert wurde, setzen Sie sich mit dem 
Absender in Verbindung. Der Absender uebernimmt ohne 
weitere Ueberpruefung keine Verantwortung fuer die 
Richtigkeit und Vollstaendigkeit des Inhalts. Unbefugte 
Empfaenger werden gebeten, die Vertraulichkeit der 
Nachricht zu wahren und den Absender sofort ueber 
einen Uebertragungsfehler zu informieren.
------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]