--- loncom/homework/randomlabel.pm 2005/06/07 22:31:30 1.77 +++ loncom/homework/randomlabel.pm 2005/06/28 14:58:23 1.78 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # random labelling tool # -# $Id: randomlabel.pm,v 1.77 2005/06/07 22:31:30 foxr Exp $ +# $Id: randomlabel.pm,v 1.78 2005/06/28 14:58:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -206,15 +206,18 @@ sub end_bgimg { # If the tag produced has sizes, they override ours. # (for now anyway). # - &Apache::lonxml::debug("Base sizes: $width_param x $height_param"); my ($plot_x, $plot_y) = &extract_tag_sizes($bgimg, $width_param, - $height_param ); + $height_param); &Apache::lonxml::debug("Extracted sizes: $plot_x x $plot_y"); - $label_xscale = $plot_x / $width_param; - $label_yscale = $plot_y / $height_param; + if ($width_param) { + $label_xscale = $plot_x / $width_param; + } + if ($height_param) { + $label_yscale = $plot_y / $height_param; + } &Apache::lonxml::debug("Scale factors: $label_xscale $label_yscale"); &Apache::lonxml::debug("Image: $bgimg"); @@ -272,8 +275,6 @@ sub end_bgimg { $Apache::lonxml::debug = 0; } else { - - $result.=&make_eps_image($bgimg,$parstack,$safeeval,-2); } }