TABLE OF CONTENTS
::pwtk::gp::orient
PURPOSE
Determine "orientation" from the values of the -s and -o options.
Rules: 1. if $opt_orient != {} then $opt_orient determines the orientation 2. if ($term != "eps" && $opt_size != {} && sx>sy) then landscape else portrait 3. if ($term != "eps" && $opt_size == {}) landscape 4. else portrait
SEE ALSO
SOURCE
set term [::pwtk::gp::gp2pwtk $term] if { $opt_orient ne {} } { return $opt_orient } elseif { [::pwtk::gp::gp2pwtk $term] ne "eps" && $opt_size ne {} } { scan $opt_size %f,%f sx sy ifset sy $sx; # just in case return [expr {$sx > $sy ? "landscape" : "portrait"}] } elseif { [::pwtk::gp::gp2pwtk $term] ne "eps" && $opt_size eq {} } { return landscape } return portrait }