version 1.28, 2002/05/20 20:35:13
|
version 1.30, 2002/07/18 20:17:45
|
Line 111 sub start_randomlabel {
|
Line 111 sub start_randomlabel {
|
$bgimg=~s/http:\/[^\/]*/\/home\/httpd\/html/; |
$bgimg=~s/http:\/[^\/]*/\/home\/httpd\/html/; |
$bgimg=~s/\/$//; |
$bgimg=~s/\/$//; |
$result.='\vspace*{2mm} \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. |
$result.='\vspace*{2mm} \noindent \epsfxsize='.$texwidth.' mm \epsffile{'. |
$bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}(0,0)('.$texwidth.','.$texwidth*$h/$w.')' |
$bgimg.'}\setlength{\unitlength}{1mm} \begin{picture}('.$texwidth.','.$texwidth*$h/$w.')' |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::text_arg('Image:','bgimg',$token,75).' '; |
$result.=&Apache::edit::text_arg('Image:','bgimg',$token,75).' '; |
Line 145 sub end_randomlabel {
|
Line 145 sub end_randomlabel {
|
if( $count != 0) { $result.= "<param name=\"ICOUNT\" value=\"$count\">\n"; } |
if( $count != 0) { $result.= "<param name=\"ICOUNT\" value=\"$count\">\n"; } |
$result .= "</applet>\n<BR />"; |
$result .= "</applet>\n<BR />"; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$result='\end{picture}\\\\'; |
$result='\end{picture}\\\\ \vskip -3 cm'; |
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::end_table; |
$result.=&Apache::edit::end_table; |
} |
} |
Line 268 sub end_labelgroup {
|
Line 268 sub end_labelgroup {
|
my $y = $Apache::randomlabel::ycoord[$i]; |
my $y = $Apache::randomlabel::ycoord[$i]; |
my $value = $Apache::randomlabel::value[$i]; |
my $value = $Apache::randomlabel::value[$i]; |
# my $tcX=$x*($texwidth/$wwidth) - $texwidth; |
# my $tcX=$x*($texwidth/$wwidth) - $texwidth; |
my $tcX=($x-10)*($texwidth/$wwidth); |
my $tcX=($x-2)*($texwidth/$wwidth); |
# my $tcY=$TY1-$y*($TY1/$wheight)-2; |
# my $tcY=$TY1-$y*($TY1/$wheight)-2; |
my $ratio=($wwidth > 0 ? $wheight/$wwidth : 1 ); |
my $ratio=($wwidth > 0 ? $wheight/$wwidth : 1 ); |
my $tcY=$TY1-$y*($TY1/$wheight)+$texwidth*$ratio; |
my $tcY=$TY1-$y*($TY1/$wheight)+$texwidth*$ratio; |