Code: Show/Hide import java.applet.*; import java.awt.*; import java.awt.geom.*; import java.util.*; public class ImageTest extends Applet { // the Images to render private Image[] images; // filename description of our images private final String[] filenames = { "simon.gif", "tj2gp.gif", "blade.gif" }; public void init() { // get the base URL java.net.URL appletBaseURL = getCodeBase(); // allocate memory for the images and load 'em in int n = filenames.length; images = new Image[n]; for(int i = 0; i < n; i++) { images[i] = getImage(appletBaseURL, filenames[i]); } } public void paint(Graphics g) { // cast the sent Graphics context to get a usable Graphics2D object Graphics2D g2d = (Graphics2D)g; // save an identity transform final AffineTransform identity = new AffineTransform(); // used to transform our images AffineTransform at = new AffineTransform(); Random r = new Random(); int width = getSize().width; int height = getSize().height; int numImages = filenames.length; // render 100 images, each with a random transformation for(int i = 0; i < 100; i++) { // clear the transformation at.setTransform(identity); // randomly set up the translation and rotation at.translate(r.nextInt()%width, r.nextInt()%height); at.rotate(Math.toRadians(360*r.nextDouble())); // draw the image g2d.drawImage(images[i%numImages], at, this); } } } // ImageTest |
Code: Show/Hide Dynamic libraries: 0x52000000 - 0x52007000 C:\WINDOWS\SYSTEM\INDICDLL.DLL |
VampZ wrote: |
what does the entire error say? is that it ? |