FileDocCategorySizeDatePackage
DrawingImages.javaAPI DocExample1193Mon Mar 24 01:58:58 GMT 1997None

DrawingImages

public class DrawingImages extends Applet

Fields Summary
Image
i
Image
j
Image
k
Image
l
Constructors Summary
Methods Summary
public voidinit()

        i = getImage (getDocumentBase(), "rosey.jpg");
        GrayImageFilter gif = new GrayImageFilter ();
        j = createImage (new FilteredImageSource (i.getSource(), gif));
        TransparentImageFilter tf = new TransparentImageFilter (.5f);
        k = createImage (new FilteredImageSource (j.getSource(), tf));
        l = createImage (new FilteredImageSource (i.getSource(), tf));
    
public voidpaint(java.awt.Graphics g)

        g.drawImage (i, 10, 10, this);                  // regular
        g.drawImage (j, 270, 10, this);                 // gray
        g.drawImage (k, 10, 110, Color.red, this);       // gray - transparent
        g.drawImage (l, 270, 110, Color.red, this);      // transparent