From 0345aae9101ec0692310854410279c9559bc3f37 Mon Sep 17 00:00:00 2001 From: stan Date: Thu, 27 Mar 2003 22:45:26 +0000 Subject: [PATCH] Fixed Hatch function. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@442 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_image.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index fb10126f5..24a323829 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -624,8 +624,10 @@ void Image::Hatch( Rgb colour, const Box *limits ) unsigned char *p = buffer; 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 ) { + //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) ) //|| ( (x > lo_x && x < hi_x && y > lo_y && y < hi_y) && !(x%2) && !(y%2) ) )