[Gtk-sharp-list] Re: [Mono-patches] r40282 - in trunk/gtk-sharp: . doc doc/en/Gdk gdk

Ben Maurer bmaurer@ximian.com
Tue, 8 Feb 2005 07:45:34 -0500 (EST)


> On Mon, 2005-02-07 at 19:19 -0500, Ben Maurer  wrote:
>> +    <Member MemberName="IsEmpty">
>> +      <MemberSignature Language="C#" Value="public bool IsEmpty {
>> get; };" /> +      <MemberType>Property</MemberType>
>> +      <ReturnValue>
>> +        <ReturnType>System.Boolean</ReturnType>
>> +      </ReturnValue>
>> +      <Parameters />
>> +      <Docs>
>> +        <summary>Checks if the point is (0,0)</summary>
>> +        <returns>true if this == (0,0</returns>
>> +      </Docs>
>> +    </Member>
>
> I wanted to comment on this over the weekend but forgot.
>
> I see that there's value in having both Rectangle.IsEmpty (meaning
> height and width both equal to zero) and this Point.IsEmpty, but an
> "empty point" just doesn't make a lot of sense. Would this be better
> named if it's is Point.IsZero or Point.IsOrigin?

I went with what was in S.D, for consistancy. Though, I'd agree that
name-wise the other methods make a bit more sense. Of course, oddly:

rect.Location.IsEmpty != rect.IsEmpty

The MS docs are worded as if everyone thinks empty == 0,0

"Gets a value indicating whether this Point is empty."

Not sure what should be done here.

-- Ben