FileDocCategorySizeDatePackage
DoubleBufferedClipped.javaAPI DocExample667Wed Mar 26 01:50:42 GMT 1997None

DoubleBufferedClipped

public class DoubleBufferedClipped extends Clipped

Fields Summary
Image
offScreenImage
Graphics
offScreenGC
Constructors Summary
Methods Summary
public voidupdate(java.awt.Graphics g)

        if ( offScreenImage == null ) {
            offScreenImage = createImage( getSize().width, getSize().height );
        	offScreenGC = offScreenImage.getGraphics();
		}

		int lastX = currentX, lastY = currentY;
		currentX = nextX; currentY = nextY;
		clipToAffectedArea( offScreenGC, lastX, lastY, currentX, currentY, imgWidth, imgHeight );
		clipToAffectedArea( g, lastX, lastY, currentX, currentY, imgWidth, imgHeight );
		paint( offScreenGC );
		g.drawImage(offScreenImage, 0, 0, this);