version 1.3, 2004/02/24 00:16:35
|
version 1.6, 2004/03/23 20:38:09
|
Line 38 BEGIN {
|
Line 38 BEGIN {
|
|
|
sub start_drawimage { |
sub start_drawimage { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
&Apache::lonxml::register('Apache::drawimage',('line','rectangle','arc','fill')); |
&Apache::lonxml::register('Apache::drawimage',('text','line','rectangle','arc','fill')); |
if ($target eq 'web' || $target eq 'tex') { |
if ($target eq 'web' || $target eq 'tex') { |
$cgi_id=&Apache::loncommon::get_cgi_id(); |
$cgi_id=&Apache::loncommon::get_cgi_id(); |
%args=(); |
%args=(); |
Line 72 sub end_drawimage {
|
Line 72 sub end_drawimage {
|
return $result; |
return $result; |
} |
} |
|
|
|
sub start_text { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result; |
|
if ($target eq 'web' || $target eq 'tex') { |
|
&Apache::lonxml::startredirection(); |
|
} |
|
return $result; |
|
} |
|
|
|
sub end_text { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result; |
|
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); |
|
my $font = &Apache::lonxml::get_param('font',$parstack,$safeeval); |
|
my $color = &Apache::lonxml::get_param('color',$parstack,$safeeval); |
|
my $direction = &Apache::lonxml::get_param('direction',$parstack,$safeeval); |
|
my $text = &Apache::lonxml::endredirection(); |
|
$text = &Apache::lonnet::escape($text); |
|
$args{"cgi.$cgi_id.OBJTYPE"}.='LABEL:'; |
|
my $i=$args{"cgi.$cgi_id.OBJCOUNT"}++; |
|
$args{"cgi.$cgi_id.OBJ$i"}=join(':',($x,$y,$text,$font,$color,$direction)); |
|
} |
|
return $result; |
|
} |
|
|
sub start_line { |
sub start_line { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |