Plotting multiple png files

조회 수: 7 (최근 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 CenterFile Exchange에서 Strategy & Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by