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

SEE ALSO

::pwtk::gp::orient

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
    }
}