#the pixel grid my @pixel_id; # this array stores all of the unique ids for each pixel $pixel_counter = 0; for(my $j = $init_y; $j < $canv_height; $j = $j + $pixel_height) { createRectangle($init_x,$init_y,$next_x,$next_y,-fill => "white",-outline => "gray"); $init_x = $next_x; $next_x = $next_x + $pixel_width; $pixel_counter++; } $init_x = 0; $next_x = $pixel_width; $init_y = $next_y; $next_y = $next_y + $pixel_height; }