Hi all,
It's my first post on this board and 'scuse my english, I'm a french guy! First, thank you Phantom for all your great stuffs (EasyCE & Tutorials...).
Now, here is my question...
using this hline function (from EasyCE):
void hline( int x1, int y1, int len, PIXEL color )
{
PIXEL* addr = (PIXEL*)getbuffer();
addr += x1 + (y1 * 240);
for ( int i = 0; i <= len; i++ ) *addr++ = color;
}
if you call this function like this:
hline( 0, 0, 10, color);
you'll get a 11 pixels length line, no? 'cause of the "<=" sign in the FOR loop.
could someone explain me if it's a normal behaviour?
thanks
c4simir
It's my first post on this board and 'scuse my english, I'm a french guy! First, thank you Phantom for all your great stuffs (EasyCE & Tutorials...).
Now, here is my question...
using this hline function (from EasyCE):
void hline( int x1, int y1, int len, PIXEL color )
{
PIXEL* addr = (PIXEL*)getbuffer();
addr += x1 + (y1 * 240);
for ( int i = 0; i <= len; i++ ) *addr++ = color;
}
if you call this function like this:
hline( 0, 0, 10, color);
you'll get a 11 pixels length line, no? 'cause of the "<=" sign in the FOR loop.
could someone explain me if it's a normal behaviour?
thanks
c4simir