|
From: Petr M. <mi...@ph...> - 2009-02-15 22:24:26
|
> >gnuplot:
> >- I will commit the patch to define GPVAL_TERM_WINDOWID.
>
> ok
It was just committed.
> >Octave:
> >- It will use "set term ..." without "size and position" by default.
> >- It will have a flag to see whether user has changed (gcf, 'position')
> >explicitly; only in this case, it will use "set term .. size position".
> >- If user wants get(gcf), then Octave will find the current values by:
> > 1a. launch new gnuplot instance with
> > set term x11 position 100,100 size 100,100
> > 1b. by means of GPVAL_TERM_WINDOWID and xwininfo, get the
> > current value of position => these are the correction factors
> > with respect to the above 100,100
> > 1c. close this dummy gnuplot session
> > 2. get xwininfo from the gcf's session and correct it by the above
> > factors
> >
> >Note that 1. can be done once only.
> >
> >Note this will work on X11 only. More portable way is that terminals report
> >some GPVAL_ variables about their position on the desktop, but it would just
> >increase the piping traffic and I doubt it's worth the effort.
>
> I'm not following the Octave part. What are the correction factors to be
> determined by 1a,b,c?
You wanted to know what is the difference between position and size of the
full x11 window (as obtained by xwininfo) and the gnuplot's drawing canvas.
Furthermore, if you combine xwininfo with "unset mouse" and "set mouse", you
can see whether the x11 window is increased in size ("set term x11") or not
("set term wxt").
> Regarding a flag to determine if the user changed the figure's position,
> we will need to find an approach that does not interfere with other
> backends. Meaning that setting and interpreting the flag should be
> isolated to the m-files supporting the gnuplot backend. I can do that if a
> gnuplot-only listener is assigned to the figure position property (i.e.
> the listener would store the last property specified by the user).
>
> Do you have another suggestion for how that might be done?
The easist way is to ignore the location and size if it contains the default
four values.
---
PM
|