Second or 'Ghost' Mouse Pointer
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello all,
I am working on a GUI which contains two axes with different images. I want to create a 'ghost mouse pointer' which appears above axes2 when I move the primary mouse pointer over axes1. The second mouse pointer should move parallel to the primary mouse pointer.
So far I am using the WindowButtonMotionFcn to capture the mouse coordinates. For the second mouse pointer, I use a small grayscale matrix representing a mouse arrow. This image is displayed in a third axes, and the axes is moved by the WindowButtonMotionFcn using set(handles.AxesPointer, 'Position', ...) when the mouse arrow is above axes1. So far so good, however, two problems remain:
1. The 'ghost mouse' is a little slower than the primary mouse (which I could live with).
2. The background of the 'ghost mouse' is black, transparent would be nicer.
Any ideas how I can render my 'ghost mouse' axes transparent, or any other way to achieve the 'ghost mouse'?
Thanks Chris
댓글 수: 0
채택된 답변
Jan
2012년 6월 30일
I suggest to keep the axes, which contains the ghost pointer fixed and move the coordinates of the image instead. I assume, this would be faster.
NaN-Values in the image's CData are displayed transparently.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!