hello, i am trying to use an offscreen buffer to create a composite
image. the folowing does not work, can someone tell me what i am doing
wrong?
protected void compositeImage()
{
int width =1024;
int height = 768;
System.out.println(imageset.length);
if (displayImage == null)
createDisplayImage();
if (offScrImage == null)
offScrImage = new BufferedImage(width,height,imageType);
if (offScrGc == null)
offScrGc = offScrImage.createGraphics();
offScrGc.setColor(Color.yellow);
offScrGc.fillRect(0,0,width,height);
offScrGc.setClip(width,height);
for (int i=0; i<imageset.length; i++){
offScrGc.drawImage(imageset[i],0, 0,this);
// in the future the images will be offset, but for now just
testing the offscreen rendering
}
dispGc.drawImage(offScrImage,0,0,this);
}