/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* ********************************************************************
**********************************************************************
**********************************************************************
*** COPYRIGHT (c) Eastman Kodak Company, 1997 ***
*** As an unpublished work pursuant to Title 17 of the United ***
*** States Code. All rights reserved. ***
**********************************************************************
**********************************************************************
**********************************************************************/
/**
* An adapter class that implements ImageProducer to allow the
* asynchronous production of a RenderableImage. The size of the
* ImageConsumer is determined by the scale factor of the usr2dev
* transform in the RenderContext. If the RenderContext is null, the
* default rendering of the RenderableImage is used. This class
* implements an asynchronous production that produces the image in
* one thread at one resolution. This class may be subclassed to
* implement versions that will render the image using several
* threads. These threads could render either the same image at
* progressively better quality, or different sections of the image at
* a single resolution.
*/
/** The RenderableImage source for the producer. */
/** The RenderContext to use for producing the image. */
/** A Vector of image consumers. */
/**
* Constructs a new RenderableImageProducer from a RenderableImage
* and a RenderContext.
*
* @param rdblImage the RenderableImage to be rendered.
* @param rc the RenderContext to use for producing the pixels.
*/
RenderContext rc) {
}
/**
* Sets a new RenderContext to use for the next startProduction() call.
*
* @param rc the new RenderContext.
*/
}
/**
* Adds an ImageConsumer to the list of consumers interested in
* data for this image.
*
* @param ic an ImageConsumer to be added to the interest list.
*/
}
}
/**
* Determine if an ImageConsumer is on the list of consumers
* currently interested in data for this image.
*
* @param ic the ImageConsumer to be checked.
* @return true if the ImageConsumer is on the list; false otherwise.
*/
}
/**
* Remove an ImageConsumer from the list of consumers interested in
* data for this image.
*
* @param ic the ImageConsumer to be removed.
*/
}
/**
* Adds an ImageConsumer to the list of consumers interested in
* data for this image, and immediately starts delivery of the
* image data through the ImageConsumer interface.
*
* @param ic the ImageConsumer to be added to the list of consumers.
*/
// Need to build a runnable object for the Thread.
}
/**
* Requests that a given ImageConsumer have the image data delivered
* one more time in top-down, left-right order.
*
* @param ic the ImageConsumer requesting the resend.
*/
// So far, all pixels are already sent in TDLR order
}
/**
* The runnable method for this class. This will produce an image using
* the current RenderableImage and RenderContext and send it to all the
* ImageConsumer currently registered with this class.
*/
public void run() {
// First get the rendered image
} else {
}
// And its ColorModel
if (colorModel == null) {
}
// Set up the ImageConsumers
while (icList.hasMoreElements()) {
}
// Get RGB pixels from the raster scanline by scanline and
// send to consumers.
int i,j;
for (j = 0; j < height; j++) {
for(i = 0; i < width; i++) {
}
// Now send the scanline to the Consumers
while (icList.hasMoreElements()) {
}
}
// Now tell the consumers we're done.
while (icList.hasMoreElements()) {
}
}
}