TABLE OF CONTENTS
::pwtk::gp::osize
SYNOPSIS
proc ::pwtk::gp::osize {orient size} {
PURPOSE
Take care of the landscape | portrait size; osize == orient-size
This routine is used to determine landscape & portrait sizes for non-EPS terminals (in Gnuplot EPS is handled differently, and -o & -s options are used verbatim without guessing the orientation)
RETURN VALUE
- if orient == landscape then max($sx,$sy),min($sx,$sy)
- else min($sx,$sy),max($sx,$sy)
SEE ALSO
SOURCE
scan $size %f,%f sx sy if { ! [string is double -strict $sx] || ! [string is double -strict $sy] } { ::pwtk::error "wrong size \"$size\", must be sx,sy" 1 } set M [expr max($sx,$sy)] set m [expr min($sx,$sy)] if { $orient eq "landscape" } { return $M,$m } else { return $m,$M } }