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.prin tln(imageset.le ngth);
if (displayImage == null)
createDisplayIm age();
if (offScrImage == null)
offScrImage = new BufferedImage(w idth,height,ima geType);
if (offScrGc == null)
offScrGc = offScrImage.cre ateGraphics();
offScrGc.setCol or(Color.yellow );
offScrGc.fillRe ct(0,0,width,he ight);
offScrGc.setCli p(width,height) ;
for (int i=0; i<imageset.leng th; i++){
offScrGc.drawIm age(imageset[i],0, 0,this);
// in the future the images will be offset, but for now just
testing the offscreen rendering
}
dispGc.drawImag e(offScrImage,0 ,0,this);
}
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.prin tln(imageset.le ngth);
if (displayImage == null)
createDisplayIm age();
if (offScrImage == null)
offScrImage = new BufferedImage(w idth,height,ima geType);
if (offScrGc == null)
offScrGc = offScrImage.cre ateGraphics();
offScrGc.setCol or(Color.yellow );
offScrGc.fillRe ct(0,0,width,he ight);
offScrGc.setCli p(width,height) ;
for (int i=0; i<imageset.leng th; i++){
offScrGc.drawIm age(imageset[i],0, 0,this);
// in the future the images will be offset, but for now just
testing the offscreen rendering
}
dispGc.drawImag e(offScrImage,0 ,0,this);
}