If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
AticAtac
Posts: 29 Joined: Mon Mar 22, 2004 2:46 pm
Location: Germany
Post
by AticAtac » Tue Nov 29, 2005 8:30 am
T getWidth() const
{
return LowerRightCorner.X - UpperLeftCorner.X;
}
shouldn't it be :
return LowerRightCorner.X - UpperLeftCorner.X + 1 ;
?
This is my understanding of "rect" and "width".
Conquistador
Posts: 340 Joined: Wed Sep 28, 2005 4:38 pm
Location: Canada, Eh!
Post
by Conquistador » Tue Nov 29, 2005 1:29 pm
Why should it be like that? It looks right to me..
Spintz
Posts: 1688 Joined: Thu Nov 04, 2004 3:25 pm
Post
by Spintz » Tue Nov 29, 2005 3:12 pm
Yes, it should be +1.
AticAtac
Posts: 29 Joined: Mon Mar 22, 2004 2:46 pm
Location: Germany
Post
by AticAtac » Tue Nov 29, 2005 3:27 pm
The problem is that many functions like draw2DImage(...) relies on this "bug". So clearing this means to update many other codes. But i think it should be done.
hybrid
Post
by hybrid » Tue Nov 29, 2005 8:42 pm
Conquistador wrote: Why should it be like that? It looks right to me..
If you have a line of pixels going (on the x-axis) from 1 to 5 it would look like this
You would assume the width to be 5 as we have 5 pixels, but the method will return 4 (=5-1).