473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

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?

Feb 28 '06 #1
1 1859
omg, im losing my mind. I got top/bottom reversed. Though i still find it
curious a negative height value doesnt throw an exception.

"Hypnotron" <ti*******@hotmail.com> wrote in message
news:4BYMf.25776$3W5.6902@trnddc02...
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?

Feb 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: | last post by:
newbie code -------------------------- #include <iostream> using namespace std; #include <cstring> class aaa {
1
by: Yaron | last post by:
Hi Is there any EASY way to convert RectangleF to a Rectangle object? Casting doesnt work, and it doesn't have a ToRectangle function or anything like that (although it should! Thanks Yaron
18
by: P.N. | last post by:
Hi! when i define array (any type) then compilator say that array is to large! ?? i need at least 10.000 instead 100. This is for numeric methods in "C" any sugestion? thx Greetings P
17
by: Mike | last post by:
I'm trying to create a page: Three sections (left, topright and bottomright), each with a heading and scrolling (overflow) content. The size of these sections should be based upon the size of the...
0
by: Markus Olderdissen | last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how to do it with stylesheet. i really have problems to create my page....
6
by: =?Utf-8?B?VGhvbWFzWg==?= | last post by:
Hi, Is it possible to read a file in reverse and only get the last 100 bytes in the file without reading the whole file from the begining? I have to get info from files that are in the last 100...
1
by: t f | last post by:
Hi FillRectangle allows me to use a rectanglef as a parameter, why doesnt DrawRectangle? Even though I can use floats as parameters? Did M$ forget to add it? Thanks t f
8
by: Mark Main | last post by:
I just bought Visual Studio 2008, I'm new to C# and trying to learn it. I'm stuck and would appreciate some help. I need to make the fastest code I can to work with a large key (it's 200 bytes...
0
by: MSwaffer | last post by:
When I run the following tests (In NUnit): public void ShouldOffsetRectangle() { RectangleF standAloneRect = new RectangleF(0, 0, 10, 10); standAloneRect.Offset(1, 1); ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.