version 1.29, 2007/09/25 22:56:48
|
version 1.30, 2007/09/25 23:16:13
|
Line 267 sub get_color_from_hexstring {
|
Line 267 sub get_color_from_hexstring {
|
return $imcolor; |
return $imcolor; |
} |
} |
|
|
|
sub add_click { |
|
my ($image) = @_; |
|
|
|
my $length=6; |
|
my $bgcolor=&get_color_from_hexstring($image,'FFFFFF'); |
|
my $fgcolor=&get_color_from_hexstring($image,'009999'); |
|
|
|
my ($x,$y) = split(':',$env{'form.clickdata'}); |
|
|
|
$image->setThickness(3); |
|
$image->line($x-$length,$y, $x+$length,$y, $bgcolor); |
|
$image->line($x, $y-$length,$x, $y+$length,$bgcolor); |
|
$image->setThickness(1); |
|
$image->line($x-$length,$y, $x+$length,$y, $fgcolor); |
|
$image->line($x, $y-$length,$x, $y+$length,$fgcolor); |
|
} |
|
|
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
$r->content_type('image/png'); |
$r->content_type('image/png'); |
Line 429 sub handler {
|
Line 446 sub handler {
|
&Apache::lonnet::logthis("randomlylabel unable to handle object of type $type"); |
&Apache::lonnet::logthis("randomlylabel unable to handle object of type $type"); |
} |
} |
} |
} |
|
if (exists($env{'form.clickdata'})) { &add_click($image); } |
$image->setThickness(1); |
$image->setThickness(1); |
$r->print($image->png); |
$r->print($image->png); |
return OK; |
return OK; |