ginput turning off cursor R2016a
1 回表示 (過去 30 日間)
古いコメントを表示
I am writing a GUI with guide and when I call ginput it turns off my mouse cursor. I know this is an old issue that was apparently resolved but I am still experiencing the problem in MATLAB 2016a.
I am calling ginput after a ButtonDownFcn as follows:
% load an image into the axis and set buttondownfnc
function load_image_Callback(hOBject, eventdata, handles)
...
set(handles.img, 'ButtonDownFcn', {@my_button_press, handles})
...
end
%call ginput upon buttdown
function my_button_press(src, ~, handles)
[x,y] = ginput(1);
...
end
When I click the image my cursor disappears, if I click again I get the x,y corrdinates of the point I click, so ginput is working, but I can't see where I'm clicking. Any ideas?
2 件のコメント
Sonam Gupta
2017 年 3 月 8 日
I don't know why you are still facing the issue but you can try the workaround suggested at
Tom Dresselaers
2017 年 9 月 21 日
編集済み: Tom Dresselaers
2017 年 9 月 21 日
I tried it in R2016a but did not work. Other options?
my workaround create your own myginput with modification (store in your working dir): set(gcf,'Pointer','crosshair','PointerShapeCData',cdata,'PointerShapeHotSpot',hotspot) % original version: set(gcf,'Pointer','custom','PointerShapeCData',cdata,'PointerShapeHotSpot',hotspot)
回答 (1 件)
Sam McDonald
2017 年 3 月 8 日
The cursor does disappear, but you should be able to see the crosshairs that appear once you move the mouse. If those are not being displayed, you could try the following
1. Execute:
opengl software
That will switch to a software version of OpenGL. If that resolves the issue, make sure your graphics driver is up-to-date. Visit the manufacturer's website for the latest driver rather than trusting the operating system.
2. Change the figure renderer. 'opengl' is default, but there is also 'painters'.
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!