StdDraw - Java - Show a gif

393 Views Asked by At

I'm making a game and I want show a gif with the stdDraw method but this doesn't work. So if someone can explain me a method to show a gif with stdDraw, this will be cool !

1

There are 1 best solutions below

0
Wojciech Domalewski On

All you need to show a gif is a single declaration, where xPos and yPos are image coordinates with respect to lower left corner of window.

StdDraw.picture(xPos,yPos, "image.gif");

I hope you know that default coordinates of the right top corner are (1, 1).

Image should be saved in project's home directory.