Plotting multiple png files
6 views (last 30 days)
Show older comments
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.
- 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.
- 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.
- 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)
0 Comments
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!