ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/falsecolor.pl
(Generate patch)

Comparing ray/src/px/falsecolor.pl (file contents):
Revision 2.22 by greg, Mon Nov 14 18:45:38 2022 UTC vs.
Revision 2.23 by greg, Mon Nov 21 20:21:36 2022 UTC

# Line 4 | Line 4
4   use warnings;
5   use strict;
6   use File::Temp qw/ tempdir /;
7 use POSIX qw/ floor /;
7  
8   my @palettes = ('def', 'spec', 'pm3d', 'hot', 'eco', 'tbo');
9  
# Line 322 | Line 321 | my $slabpic = "$td/slab.hdr";
321   my $cmd;
322   if ($legwidth > 0) {
323      # Legend: Create the text labels
324 <    my $sheight = floor($legheight / $ndivs );
325 <    my $theight = floor($legwidth/(8/1.67));
324 >    my $sheight = int($legheight / $ndivs );
325 >    my $theight = int($legwidth/(8/1.67));
326      my $stheight = $sheight <= $theight ? $sheight : $theight;
327 <    my $vlegheight = $sheight * $ndivs * (1+1.5/$ndivs);
327 >    my $vlegheight = int($sheight * $ndivs * (1+1.5/$ndivs));
328      my $tslabpic = "$td/slabT.hdr";
329      system "psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight $label > $tslabpic";
330      my $loop = $ndivs+$haszero;
331 <    my $hlegheight = $sheight * ($loop) + $sheight * .5;
331 >    my $hlegheight = int($sheight * ($loop) + $sheight * .5);
332      my $pcompost = qq[pcompos -b 0 0 0 =-0 $tslabpic 0 $hlegheight ];
333      for (my $i=0; $i<$loop; $i++) {
334          my $imap = ($ndivs - $i) / $ndivs;
# Line 347 | Line 346 | if ($legwidth > 0) {
346          }
347          $tslabpic = "$td/slab$i.hdr";
348          system "psign -s -.15 -cf 1 1 1 -cb 0 0 0 -h $stheight $value > $tslabpic";
349 <        $hlegheight = $sheight * ($loop - $i - 1) + $sheight * .5;
349 >        $hlegheight = int($sheight * ($loop - $i - 1) + $sheight * .5);
350          $pcompost .= qq[=-0 $tslabpic 0 $hlegheight ];
351      }
352      $pcompost .= qq[ > $slabpic];
# Line 372 | Line 371 | if ($legwidth > 0) {
371   my $slabinvpic = "$td/slabinv.hdr";
372   system qq[pcomb -e "lo=1-gi(1)" $slabpic > $slabinvpic];
373  
374 < my $sh0 = -floor($legheight / $ndivs / 2);
374 > my $sh0 = -int($legheight / $ndivs / 2);
375   if ($haszero < 1) {
376 <    $sh0 = -floor($legheight / ($ndivs)*1.5);
376 >    $sh0 = -int($legheight / ($ndivs)*1.5);
377   }
378  
379   # Command line without extrema
# Line 509 | Line 508 | if ($doextrem) {
508      $cmd .= qq[ =00 $minvpic $lxmin $ymin =00 $maxvpic $lxmax $ymax];
509   }
510  
511 < # Clean up and simplify info header with out command arguments
512 < $cmd .= qq[ | getinfo -r "pcompos " "falsecolor @savedARGV"];
511 > # Clean up and simplify info header without constituent commands
512 > $cmd .= qq[ | getinfo -r "EXPOSURE" "pcompos " "falsecolor @savedARGV"];
513  
514   # Process image and combine with legend
515   exec $cmd;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines