I need to make one image move on top of another image..in gui

2 次查看(过去 30 天)
I've got a snakes and ladders board that I uploaded as follow
Axes(handles.axes2); %assuming axes 2 is where the board is displayed.
Imshow('board.jpg'); %assuming the name of the image is board.
[Myobj,xs,ys]=freehanddraw(gca,'color','r','linewidth',3);
How do I load an image ontop of this board,sothat if the position of the player changes,there is some image that moves on the board to indicate the position...

回答(1 个)

Walter Roberson
Walter Roberson 2011-9-11
I can't think of any way to do that.
It would be much easier if your code moved the image, rather than expecting the image to move "by itself" when the player position changed.
For a hint on how to move an image: look at the last few properties described in http://www.mathworks.com/help/techdoc/ref/image_props.html

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by