Diff for /loncom/homework/drawimage.pm between versions 1.7 and 1.9

version 1.7, 2004/09/09 07:24:56 version 1.9, 2006/05/30 12:45:36
Line 29 Line 29
 package Apache::drawimage;  package Apache::drawimage;
 use strict;  use strict;
 use Apache::loncommon;  use Apache::loncommon;
   use lib '/home/httpd/lib/perl/';
   use LONCAPA;
    
   
 my %args;  my %args;
 my $cgi_id;  my $cgi_id;
Line 96  sub end_text { Line 99  sub end_text {
         my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval);          my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval);
         my $direction = &Apache::lonxml::get_param('direction',$parstack,$safeeval);          my $direction = &Apache::lonxml::get_param('direction',$parstack,$safeeval);
  my $text  = &Apache::lonxml::endredirection();   my $text  = &Apache::lonxml::endredirection();
         $text = &Apache::lonnet::escape($text);          $text = &escape($text);
         $args{"cgi.$cgi_id.OBJTYPE"}.='LABEL:';          $args{"cgi.$cgi_id.OBJTYPE"}.='LABEL:';
  my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;   my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
  $args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$text,$font,$color,$direction));   $args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$text,$font,$color,$direction));
Line 262  sub end_image { Line 265  sub end_image {
     my $result;      my $result;
     if ($target eq 'web' || $target eq 'tex') {      if ($target eq 'web' || $target eq 'tex') {
  my $bgimg=&Apache::lonxml::endredirection();   my $bgimg=&Apache::lonxml::endredirection();
  &Apache::lonnet::logthis("image $bgimg");  
  my $x = &Apache::lonxml::get_param('x',$parstack,$safeeval);   my $x = &Apache::lonxml::get_param('x',$parstack,$safeeval);
         my $y = &Apache::lonxml::get_param('y',$parstack,$safeeval);          my $y = &Apache::lonxml::get_param('y',$parstack,$safeeval);
  my $clipx = &Apache::lonxml::get_param('clipx',$parstack,$safeeval);   my $clipx = &Apache::lonxml::get_param('clipx',$parstack,$safeeval);
Line 278  sub end_image { Line 280  sub end_image {
  my $transparent =    my $transparent = 
     &Apache::lonxml::get_param('transparent',$parstack,$safeeval);      &Apache::lonxml::get_param('transparent',$parstack,$safeeval);
  $bgimg=&Apache::imageresponse::clean_up_image($bgimg);   $bgimg=&Apache::imageresponse::clean_up_image($bgimg);
  &Apache::lonnet::logthis("image af clean $bgimg");  
  my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;   my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++;
  $args{"cgi.$cgi_id.OBJTYPE"}.='IMAGE:';   $args{"cgi.$cgi_id.OBJTYPE"}.='IMAGE:';
  $args{"cgi.$cgi_id.OBJ$i"} =    $args{"cgi.$cgi_id.OBJ$i"} = 
     join(':',($x,$y,&Apache::lonnet::escape($bgimg),$transparent,      join(':',($x,$y,&escape($bgimg),$transparent,
       $clipx,$clipy,$scaledwidth,$scaledheight,$clipwidth,$clipheight));        $clipx,$clipy,$scaledwidth,$scaledheight,$clipwidth,$clipheight));
     }      }
     return $result;      return $result;

Removed from v.1.7  
changed lines
  Added in v.1.9


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>