help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with the ui* family of functions


From: Martin Kunz
Subject: Re: Problems with the ui* family of functions
Date: Thu, 20 Oct 2016 13:05:46 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0


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.:
  1. I run figure() and uipanel(). The uipanel fills the screen.
  2. I increase the figure size. The uipanel stays the same size.
  3. 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]