/[marvin]/marvin/src/libsip/perl_interface/debug_tk.pl
ViewVC logotype

Diff of /marvin/src/libsip/perl_interface/debug_tk.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by exos, Thu Sep 11 05:00:21 2003 UTC revision 1.4 by exos, Thu Sep 11 21:06:23 2003 UTC
# Line 17  sub import Line 17  sub import
17      $oy = 0;      $oy = 0;
18      $i = 0;      $i = 0;
19      $max = 0;      $max = 0;
20        $min = 0;
21    
22      $size = 0;      $size = 0;
23    
24      foreach $y ( @tab )      foreach $y ( @tab )
25      {      {
26          if ($max < abs($y))          if ($max < $y)
27          {          {
28              $max = abs($y);              $max = $y;
29          }          }
30    
31            if ($min > $y)
32            {
33                $min = $y;
34            }
35    
36          $size ++;          $size ++;
37      }      }
38      $size--;      $size--;
39    
40        $max -= $min;
41      foreach $y ( @tab )      foreach $y ( @tab )
42      {      {
43          $cannevas->createLine($ox * (600 / $size), $oy * (400 / $max),          $cannevas->createLine($ox * (600 / $size), ($oy - $min) * (400 / $max),
44                                $i * (600 / $size), $y * (400 / $max),                                $i * (600 / $size), ($y - $min) * (400 / $max),
45                                -width => 1,                                -width => 1,
46                                fill => 'red');                                fill => 'red');
47          ($ox, $oy) = ($i, $y);          ($ox, $oy) = ($i, $y);
48          $i++;          $i++;
         print "$i, 0, $i, $y\n";  
49      }      }
   
     print "@tab -> $req\n";  
50      MainLoop;      MainLoop;
51      return 6;      return 6;
52  }  }

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26