|
From: Ethan M. <merritt@u.washington.edu> - 2005-11-10 23:33:17
|
> Submitted By: Harald Harders (harders)
>
> Depending on the terminal, either
>
> term->xcanvas = term->xmax * xsize;
> term->ycanvas = term->ymax * ysize;
> (when 'set size' changes the canvas)
>
> or
>
> term->xcanvas = term->xmax;
> term->ycanvas = term->ymax;
> (when 'set size' does not change the canvas)
>
> will be appropriate.
In the general case, don't we need to know all four
corners of the canvas? So far as I understand the
code in the postscript driver, it uses both
"set size ..." and "set offset ..." to generate the
true canvas. For instance:
switch (ps_params->psformat) {
case PSTERM_EPS:
term->xmax = PS_XMAX;
if (ps_params->oldstyle)
term->ymax = PS_YMAX_OLDSTYLE;
else
term->ymax = PS_YMAX;
xmin_t = term->xmax * xoffset / (2*PS_SC);
xmax_t = term->xmax * (xsize + xoffset) / (2*PS_SC);
ymin_t = term->ymax * yoffset / (2*PS_SC);
ymax_t = term->ymax * (ysize + yoffset) / (2*PS_SC);
break;
Don't we really want these same values, or at least their
unscaled equivalents, available to the core code?
E.g.:
term->canvas.xleft = xmin_t * PS_SC;
term->canvas.xright = xmax_t * PS_SC;
term->canvas.ybot = ymin_t * PS_SC;
term->canvas.ytop = ymax_t * PS_SC;
(give or take a factor of 2).
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|