Plotting multiple png files

6 ビュー (過去 30 日間)
MF
MF 2017 年 12 月 19 日
編集済み: Image Analyst 2017 年 12 月 19 日
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)

回答 (0 件)

カテゴリ

Help Center および File ExchangeStrategy & Logic についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by