[LON-CAPA-cvs] cvs: loncom /homework drawimage.pm

raeburn raeburn at source.lon-capa.org
Fri Apr 5 18:44:19 EDT 2024


raeburn		Fri Apr  5 22:44:19 2024 EDT

  Modified files:              
    /loncom/homework	drawimage.pm 
  Log:
  - polygon (and point) tags within a drawimage element are also included for
    tex target.
  
  
Index: loncom/homework/drawimage.pm
diff -u loncom/homework/drawimage.pm:1.12 loncom/homework/drawimage.pm:1.13
--- loncom/homework/drawimage.pm:1.12	Fri Apr  5 04:05:08 2024
+++ loncom/homework/drawimage.pm	Fri Apr  5 22:44:19 2024
@@ -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 @@
     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 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 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)");




More information about the LON-CAPA-cvs mailing list