--- loncom/homework/drawimage.pm 2024/04/05 04:05:08 1.12 +++ loncom/homework/drawimage.pm 2024/04/05 22:44:19 1.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # programatic image drawing # -# $Id: drawimage.pm,v 1.12 2024/04/05 04:05:08 raeburn Exp $ +# $Id: drawimage.pm,v 1.13 2024/04/05 22:44:19 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -240,7 +240,7 @@ sub start_polygon { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result; &Apache::lonxml::register('Apache::drawimage',('point')); - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'tex') { undef(@polygon); } return $result; @@ -249,7 +249,7 @@ sub start_polygon { sub end_polygon { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'tex') { my $color=&Apache::lonxml::get_param('color',$parstack,$safeeval); my $filled=&Apache::lonxml::get_param('filled',$parstack,$safeeval); my $open=&Apache::lonxml::get_param('open',$parstack,$safeeval); @@ -267,7 +267,7 @@ sub end_polygon { sub start_point { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; my $result; - if ($target eq 'web') { + if ($target eq 'web' || $target eq 'tex') { my $x = &Apache::lonxml::get_param('x',$parstack,$safeeval); my $y = &Apache::lonxml::get_param('y',$parstack,$safeeval); push (@polygon,"($x,$y)");