Examples of ImageProducer


Examples of java.awt.image.ImageProducer

                && icon.getIconHeight() > 0) {
            BufferedImage img = new BufferedImage(icon.getIconWidth(),
                    icon.getIconWidth(), BufferedImage.TYPE_INT_ARGB);
            icon.paintIcon(component, img.getGraphics(), 0, 0);
            ImageFilter filter = new RGBGrayFilter();
            ImageProducer producer = new FilteredImageSource(img.getSource(), filter);
            Image resultImage = component.createImage(producer);
            return new ImageIconUIResource(resultImage);
        }
        return super.getDisabledIcon(component, icon);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

  if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
      filter = new AreaAveragingScaleFilter(width, height);
  } else {
      filter = new ReplicateScaleFilter(width, height);
  }
  ImageProducer prod;
  prod = new FilteredImageSource(getSource(), filter);
  return Toolkit.getDefaultToolkit().createImage(prod);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

                && icon.getIconHeight() > 0) {
            BufferedImage img = new BufferedImage(icon.getIconWidth(),
                    icon.getIconWidth(), BufferedImage.TYPE_INT_ARGB);
            icon.paintIcon(component, img.getGraphics(), 0, 0);
            ImageFilter filter = new RGBGrayFilter();
            ImageProducer producer = new FilteredImageSource(img.getSource(), filter);
            Image resultImage = component.createImage(producer);
            return new ImageIconUIResource(resultImage);
        }
        return super.getDisabledIcon(component, icon);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

    /**
     * Get a rectangular region of the baseImage modified by an image filter.
     */
    Image getHighlight(int x, int y, int w, int h, ImageFilter filter) {
  ImageFilter cropfilter = new CropImageFilter(x, y, w, h);
  ImageProducer prod = new FilteredImageSource(baseImage.getSource(),
                 cropfilter);
  return makeImage(prod, filter, 0);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

        }
      }
    }; // end of inner class

    // Setup to use transparency filter
    ImageProducer ip = new FilteredImageSource(image.getSource(), filter);

    // Pull the old image thru this filter and create a new one
    return Toolkit.getDefaultToolkit().createImage(ip);
  }
View Full Code Here

Examples of java.awt.image.ImageProducer

                && icon.getIconHeight() > 0) {
            BufferedImage img = new BufferedImage(icon.getIconWidth(),
                    icon.getIconWidth(), BufferedImage.TYPE_INT_ARGB);
            icon.paintIcon(component, img.getGraphics(), 0, 0);
            ImageFilter filter = new RGBGrayFilter();
            ImageProducer producer = new FilteredImageSource(img.getSource(), filter);
            Image resultImage = component.createImage(producer);
            return new ImageIconUIResource(resultImage);
        }
        return super.getDisabledIcon(component, icon);
    }
View Full Code Here

Examples of java.awt.image.ImageProducer

        if ((hints & (SCALE_SMOOTH | SCALE_AREA_AVERAGING)) != 0) {
            filter = new AreaAveragingScaleFilter(width, height);
        } else {
            filter = new ReplicateScaleFilter(width, height);
        }
        ImageProducer prod;
        prod = new FilteredImageSource(getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
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

    protected void loadImage() throws FopImageException {
        //org.apache.fop.messaging.MessageHandler.debug(getClass().getName()+".loadImage(): "+this.m_href);
        int[] tmpMap = null;
        try {
            ImageProducer ip = (ImageProducer)this.m_href.getContent();
            FopImageConsumer consumer = new FopImageConsumer(ip);
            ip.startProduction(consumer);


            //Load the image into memory
            while (!consumer.isImageReady()) {
                Thread.sleep(500);
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
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.