--- loncom/homework/drawimage.pm	2004/02/23 23:29:14	1.2
+++ loncom/homework/drawimage.pm	2004/02/24 00:16:35	1.3
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # programatic image drawing
 #
-# $Id: drawimage.pm,v 1.2 2004/02/23 23:29:14 albertel Exp $
+# $Id: drawimage.pm,v 1.3 2004/02/24 00:16:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -82,7 +82,7 @@ sub start_line {
 	my $y2 = &Apache::lonxml::get_param('y2',$parstack,$safeeval);
 	my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval);
 	my $thickness = &Apache::lonxml::get_param('thickness',$parstack,$safeeval);
-	my $i=(++$args{"cgi.$cgi_id.OBJCOUNT"})-1;
+	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x1,$y1,$x2,$y2,$color,$thickness));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='LINE:';
     }
@@ -108,7 +108,7 @@ sub start_rectangle {
 						   $safeeval);
 	my $filled = &Apache::lonxml::get_param('filled',$parstack,
 						$safeeval);
-	my $i=(++$args{"cgi.$cgi_id.OBJCOUNT"})-1;
+	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=
 	    join(':',($x1,$y1,$x2,$y2,$color,$thickness,$filled));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='RECTANGLE:';
@@ -135,7 +135,7 @@ sub start_arc {
 	my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval);
 	my $thickness = &Apache::lonxml::get_param('thickness',$parstack,$safeeval);
 	my $filled = &Apache::lonxml::get_param('filled',$parstack,$safeeval);
-	my $i=(++$args{"cgi.$cgi_id.OBJCOUNT"})-1;
+	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=
 	    join(':',($x,$y,$width,$height,$start,$end,$color,$thickness,
 		      $filled));
@@ -157,7 +157,7 @@ sub start_fill {
 	my $x = &Apache::lonxml::get_param('x',$parstack,$safeeval);
 	my $y = &Apache::lonxml::get_param('y',$parstack,$safeeval);
 	my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval);
-	my $i=(++$args{"cgi.$cgi_id.OBJCOUNT"})-1;
+	my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
 	$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$color));
 	$args{"cgi.$cgi_id.OBJTYPE"}.='FILL:';
     }