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

3 visualizzazioni (ultimi 30 giorni)
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...

Risposte (1)

Walter Roberson
Walter Roberson il 11 Set 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

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by