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

2 views (last 30 days)
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...

Answers (1)

Walter Roberson
Walter Roberson on 11 Sep 2011
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

Categories

Find more on Visual Exploration in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!