Examples of FilteredImageSource


Examples of java.awt.image.FilteredImageSource

     *      java.awt.Color, java.awt.image.ImageObserver)
     */
    public final boolean drawImage(Image image, int x, int y, int width, int height, Color bgcolor,
                                   ImageObserver observer) {
        return drawImage(
            new ToolkitImage(new FilteredImageSource(image.getSource(), new AreaAveragingScaleFilter(width, height))),
            x,
            y, bgcolor, observer);
    }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

     * @return boolean
     * @see java.awt.Graphics#drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver)
     */
    public final boolean drawImage(Image image, int x, int y, int width, int height, ImageObserver observer) {
        return drawImage(
            new ToolkitImage(new FilteredImageSource(image.getSource(), new AreaAveragingScaleFilter(width, height))),
            x,
            y, observer);
    }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

            heightDest = dy1 - dy2 + 1;
            yDest = dy2;
        }

        // Extract the image with a CropImageFilter
        final Image imageArea = new ToolkitImage(new FilteredImageSource(image.getSource(),
            new CropImageFilter(xImage, yImage, widthImage, heightImage)));
        if (bgColor == null) {
            return drawImage(imageArea, xDest, yDest, widthDest, heightDest, observer);
        } else {
            return drawImage(imageArea, xDest, yDest, widthDest, heightDest, bgColor, observer);
View Full Code Here

Examples of java.awt.image.FilteredImageSource

        if (template == null) {
            return null;
        }
        final java.awt.Image iconImage = template.getIcon(height);
        if (tint != null) {
            Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(iconImage.getSource(), new Filter()));
        }
        final Image icon = new AwtImage(iconImage);
        return icon;
    }
View Full Code Here

Examples of java.awt.image.FilteredImageSource

        Toolkit tk = Toolkit.getDefaultToolkit();

        if (transparentColor != null) {
            int rgb = transparentColor.getRGB();
            image = tk.createImage(
                    new FilteredImageSource(image.getSource(),
                            new TransparentImageFilter(rgb)));
        }

        BufferedImage buffered = new BufferedImage(
                image.getWidth(null),
View Full Code Here

Examples of java.awt.image.FilteredImageSource

        Toolkit tk = Toolkit.getDefaultToolkit();

        if (transparentColor != null) {
            int rgb = transparentColor.getRGB();
            image = tk.createImage(
                    new FilteredImageSource(image.getSource(),
                            new TransparentImageFilter(rgb)));
        }

        BufferedImage buffered = new BufferedImage(
                image.getWidth(null),
View Full Code Here

Examples of java.awt.image.FilteredImageSource

            }

            ImageFilter scaleFilter =
                new ReplicateScaleFilter((int) (zoom * width), (int)(vzoom*height));
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));
            Dimension sz = getSize();
            repaint(0, 0, 0, sz.width - 1, sz.height - 1);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of java.awt.image.FilteredImageSource

            height = (int)(vzoom*height);

            ImageFilter scaleFilter =
                new ReplicateScaleFilter(width, height);
            scaledSpectrogram =
                createImage(new FilteredImageSource(spectrogram.getSource(),
                                                    scaleFilter));

            // so ScrollPane gets notified of the new size:
            setPreferredSize(new Dimension(width, height));
            revalidate();
View Full Code Here

Examples of java.awt.image.FilteredImageSource

     *
     * @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.FilteredImageSource

     *
     * @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.