Problem with getframe and R2014b
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a rather complex GUI figure (hundreds of elements), and I am finding that with Matlab R2014b (but not previous versions), when I call getframe to take a snapshot of an axes object within it, many of the GUI elements vanish, including the axes (although the correct image is successfully saved). By stepping through getframe in the debugger, I've found that it happens when it calls alternateGetframe, which is an internal Matlab function with no source code available. This also happens when I call getframe directly from the command line, instead of from within my callbacks.
Switching the figure window from foreground to background or the reverse brings some of the GUI elements back, but not all of them. Inspecting all of the properties of the handles for the missing elements shows nothing unusual: according to the properties I see, they should all show up, but they don't.
I haven't managed to reproduce the problem with smaller examples. Is anything like this a known problem?
Pro tem, is there any way of telling R2014b to use the old handle graphics system? I notice that getframe.m contains code to detect which system is in use. If I execute the code in getframe that would be executed when useCaptureScreen is true, it works without problems.
2 Kommentare
matt dash
am 10 Dez. 2014
You might check out some of the getframe replacements on the file exchange. I have a simple one named getscreen that uses a screenshot capability in java. Yair Altman has one named screencapture that has a lot more features.
Adam Simonsen
am 29 Dez. 2015
Does anybody know if this problem (GUI elements disappearing when using getframe) has been solved in later MATLAB releases ?
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!