Examples of ImageProducer


Examples of java.awt.image.ImageProducer

    // Get the colorizing filter
    int[] targetColors = _getTargetColors(requestedProperties);
    ImageFilter filter = new ColorizingFilter(_SOURCE_COLORS, targetColors);

    Toolkit toolkit = Toolkit.getDefaultToolkit();
    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());
View Full Code Here

Examples of java.awt.image.ImageProducer

      return null;
    }

    Toolkit toolkit = Toolkit.getDefaultToolkit();

    ImageProducer producer = icon.getSource();

    // If direction is RTL, flip the source image
    if (_isRightToLeft(context))
      producer = new FilteredImageSource(producer, new MirrorImageFilter());
View Full Code Here

Examples of java.awt.image.ImageProducer

    }

    protected void loadImage() throws FopImageException {
        int[] tmpMap = null;
        try {
            ImageProducer ip = (ImageProducer)this.m_href.getContent();
            FopImageConsumer consumer = new FopImageConsumer(ip);
            ip.startProduction(consumer);

            while (!consumer.isImageReady()) {
                Thread.sleep(500);
            }
            this.m_height = consumer.getHeight();
View Full Code Here

Examples of java.awt.image.ImageProducer

    }

    protected void loadImage() throws FopImageException {
        int[] tmpMap = null;
        try {
            ImageProducer ip = Jimi.getImageProducer(this.m_href.openStream(),
                                                     Jimi.SYNCHRONOUS
                                                     | Jimi.IN_MEMORY);
            FopImageConsumer consumer = new FopImageConsumer(ip);
            ip.startProduction(consumer);

            while (!consumer.isImageReady()) {
                Thread.sleep(500);
            }
            this.m_height = consumer.getHeight();
View Full Code Here

Examples of java.awt.image.ImageProducer

            return 1;
        }

        public ImageProducer getSource() {

            return new ImageProducer() {
                Set<ImageConsumer> consumers = new HashSet<ImageConsumer>();

                public synchronized void addConsumer(ImageConsumer ic) {
                    consumers.add(ic);
                }
View Full Code Here

Examples of java.awt.image.ImageProducer

        }
    }

    private synchronized void loadInitImage(boolean wait, final ImageObserver observer) {
        if (!productionStarted) {
            final ImageProducer producer = initProducer;
            // Loads asynchronously initial image if not yet done
            new Thread() {
                public void run() {
                    producer.startProduction(new JNodeConsumer(producer, observer));
                }
            }
                .start();

            productionStarted = true;
View Full Code Here

Examples of java.awt.image.ImageProducer

    public synchronized byte[] getBytes() throws IOException {
    return resource.getBytes();
    }

    public synchronized ImageProducer getImageProducer() {
    ImageProducer imageProducer = resource.getImageProducer();


    // This is due to a stupid bug in ImageConsumerQueue,
    // which seems to be introduced in jdk1.3, which
    // forbids me to use my own ImageProducer implementation.
View Full Code Here

Examples of java.awt.image.ImageProducer

    }

    public synchronized ImageProducer getImageProducer() {
    if(DEBUG) System.err.println("#### Resource.getImageProducer:");

    ImageProducer imageProducer = null;

    if(object != null)
      imageProducer = (ImageProducer)object;
    else {
            // we use a PrivilegedAction here because otherwise the system classloader
View Full Code Here

Examples of java.awt.image.ImageProducer

     *
     * @return a brighter image
     */
    public static Image createBrighterImage(Image i) {
        ColorFilter filter = ColorFilter.getInstance(true, _percent);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

     *
     * @return a darker image.
     */
    public static Image createDarkerImage(Image i) {
        ColorFilter filter = ColorFilter.getInstance(false, _percent);
        ImageProducer prod = new FilteredImageSource(i.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.