Ejemplo n.º 1
0
 private void produce() {
   if (consumer != null) {
     consumer.setDimensions(width, height);
   }
   if (consumer != null) {
     consumer.setProperties(new Hashtable());
   }
   sendPixels();
   if (consumer != null) {
     consumer.imageComplete(ImageConsumer.SINGLEFRAMEDONE);
   }
 }
 private void initConsumer(ImageConsumer ic) {
   if (isConsumer(ic)) {
     ic.setDimensions(width, height);
   }
   if (isConsumer(ic)) {
     ic.setProperties(properties);
   }
   if (isConsumer(ic)) {
     ic.setColorModel(model);
   }
   if (isConsumer(ic)) {
     ic.setHints(
         animating
             ? (fullbuffers
                 ? (ImageConsumer.TOPDOWNLEFTRIGHT | ImageConsumer.COMPLETESCANLINES)
                 : ImageConsumer.RANDOMPIXELORDER)
             : (ImageConsumer.TOPDOWNLEFTRIGHT
                 | ImageConsumer.COMPLETESCANLINES
                 | ImageConsumer.SINGLEPASS
                 | ImageConsumer.SINGLEFRAME));
   }
 }