Fixed Hatch function.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@442 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-03-27 22:45:26 +00:00
parent 2d66f0f8e6
commit 0345aae910
1 changed files with 2 additions and 0 deletions

View File

@ -624,8 +624,10 @@ void Image::Hatch( Rgb colour, const Box *limits )
unsigned char *p = buffer; unsigned char *p = buffer;
for ( int y = lo_y; y <= hi_y; y++ ) for ( int y = lo_y; y <= hi_y; y++ )
{ {
unsigned char *p = &buffer[colours*((y*width)+lo_x)];
for ( int x = lo_x; x <= hi_x; x++, p += colours ) for ( int x = lo_x; x <= hi_x; x++, p += colours )
{ {
//if ( ( (x == lo_x || x == hi_x) && (y >= lo_y && y <= hi_y) ) //if ( ( (x == lo_x || x == hi_x) && (y >= lo_y && y <= hi_y) )
//|| ( (y == lo_y || y == hi_y) && (x >= lo_x && x <= hi_x) ) //|| ( (y == lo_y || y == hi_y) && (x >= lo_x && x <= hi_x) )
//|| ( (x > lo_x && x < hi_x && y > lo_y && y < hi_y) && !(x%2) && !(y%2) ) ) //|| ( (x > lo_x && x < hi_x && y > lo_y && y < hi_y) && !(x%2) && !(y%2) ) )