Plotting multiple png files

6 views (last 30 days)
MF
MF on 19 Dec 2017
Edited: Image Analyst on 19 Dec 2017
I am creating an archery game in which the user aims at balloons moving left to right on the screen. I am having a few issues.
  1. I know how to get a png with its transparency on the figure window, but I don't know how to plot said figure at a specific point in the plot.
  2. I am not sure how to plot multiple png files. There should be multiple balloons on the screen at once but when I try to plot a new one t erases the old, I've tried using hold on.
  3. I can't get the balloons to move left or right to simulate floating.
figure()
axis([0 100 0 100])
hold on
[bird_a,mapa,aData]=imread('1bird.png');
bird_a=flipdim(bird_a,1);
aData=flipdim(aData,1);
fHand=imshow(bird_a);
set(fHand,'XData',[0 pWidth],'YData',[0 pHeight])
set(fHand,'alphaData',aData)
[bird_b,mapb,bData]=imread('2bird.png');
bird_b=flipdim(bird_a,1);
bData=flipdim(bData,1);
fHand=imshow(bird_b);
set(50,50)
set(fHand,'alphaData',bData)

Answers (0)

Categories

Find more on Strategy & Logic in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!