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

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?
 
H

Hypnotron

omg, im losing my mind. I got top/bottom reversed. Though i still find it
curious a negative height value doesnt throw an exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top