I think "slow" means the interpreter and the figure (gui thread) are no more
synchronized: the last time the interpreter asked for a "drawnow" the gui
was already being drawing the previous figure state, so in the end a
"drawnow" has been dropped. And you can wait as long as you want, until a
drawnow is requested by the graphics sytem (the interpreter drawnow doesn't
do the job for me) this problem will stand.
What if you drag the corner of the figure just a little bitmore, do
uicontrols come back to their expected positions?
I tested the following :
figure ()
uipanel ()
## Drag the corner of the figure fast enough to have uipanel misplaced
pos = get (gcf, "position");
set (gcf, "position", pos+2)
## the uipanel takes the full canvas again
Pantxo
I am running the lines quoted above. From what you wrote I conclude
that you see an update of the figure while dragging the corner. This
is different on my system (Win 7, Qt graphics toolkit): Whenever I
drag a corner of the figure, no redrawing of the figure happens
until I release the left mouse button. This is consistent with the
behaviour of any other figure window here, no figure content is ever
updated while I keep the left mouse button pressed.
After releasing the left mouse button, the uipanel from your example
code is resized to the last (not current) figure position, i.e.:
- I run figure() and uipanel(). The uipanel fills the screen.
- I increase the figure size. The uipanel stays the same size.
- I increase the figure size. The uipanel grows so that it would
fill the figure window extend set in 2., but as the figure is
bigger now, I get a white border on the right and bottom of the
figure window.
I have repeated step 3 many times with always the same result.
Making the figure window successively smaller hides the 1px border
on the right and the bottom (because the uipanel is then too big
to fit into the figure window).
The speed of dragging does not have an influence on the result as
far as I can tell.
The lines
pos = get (gcf, "position");
set (gcf, "position", pos+2)
resize the uipanel to almost the right size, but a 1px white margin
on the right hand side remains.
|