octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44781] Qt (but not FLTK) figure draws empty a


From: Michael Goffioul
Subject: [Octave-bug-tracker] [bug #44781] Qt (but not FLTK) figure draws empty axes before doing the actual plot
Date: Wed, 08 Apr 2015 20:46:26 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36

Follow-up Comment #2, bug #44781 (project octave):

I think it's more due to the fact that Qt and octave lives in different
thread. When octave creates a figure (e.g. "gcf"), the figure object is
created immediately (synchronously IIRC) in Qt. Once the figure object is
created, octave starts populating it (axes, line...). This can take some time,
and during that time the Qt event loop is running, so it's possible the Qt
window receives an expose event, while octave hasn't added the line object.

In other words, a typical "plot" does the following:

% create the figure
figure(...)
% create the axes
axes(...)
% create the line
line(...)


Between, the axes and the line creation, especially if the line creation takes
some time, the Qt event loop can process an expose event for the created
figure window, hence drawing the figure with a default axes object.

This does not occur when the figure is created separately, because by the time
octave executes the plot command (which then only consist of the axes and line
creation), Qt has most likely already processed the expose event of the figure
window; as the figure didn't have any axes object, it's been drawn empty. And
no further expose event is going to be generated between the axes and line
creation, in normal situation. In theory, if the line creation is long enough,
you could still get the same issue if you manage to force a redraw/expose of
the figure window (e.g. resizing it, overlapping it with another window and
bringing it to foreground again...).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44781>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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