Problem with getframe and R2014b
조회 수: 1 (최근 30일)
이전 댓글 표시
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
matt dash
2014년 12월 10일
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
2015년 12월 29일
Does anybody know if this problem (GUI elements disappearing when using getframe) has been solved in later MATLAB releases ?
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!