BUG? RectangleF.FromLTRB(-100, 100, 100, -100)

  • Thread starter Thread starter Hypnotron
  • Start date Start date
H

Hypnotron

Dim Dimensions as RectangleF = RectangleF.FromLTRB(-100, 100, 100, -100)

debug.writeline( "Height = " & RectangleF.Height.ToString)

Why the heck is height -200 ? How can you have a negative height?

Width is ok, but height is clearly wrong. This looks very much like a bug to
me. Further, when you try to check

Dim mybool as Boolean = Dimensions.Contains(50.0,50.0)

mybool = False ' this is clearly wrong too as 50, 50 is both >-100 and
<100 for both x and y

So, for the time being i just wrote my own PointInRect() to deal with that.
So does anyone else think this is a bug? Negative height what gives?
 
omg, im losing my mind. I got top/bottom reversed. Though i still find it
curious a negative height value doesnt throw an exception.
 
Back
Top