Package java.awt.image

Examples of java.awt.image.FilteredImageSource


                return rgb;
            }
          }
        };

        ImageProducer ip = new FilteredImageSource(im.getSource(), filter);
        return  Toolkit.getDefaultToolkit().createImage(ip);
      }
View Full Code Here


                break;
            }

            // create final image
            if (zoomIndex == BASE_ZOOM_INDEX) {
                image = createImage(new FilteredImageSource(tempImage
                        .getSource(), new KeyAlphaFilter(TRANSPARENT)));
            } else {
                image = getScaledImage(createImage(new FilteredImageSource(
                        tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))));
            }
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

                graph.setColor(getStatusBarColor(percentRemaining));
                graph.fillRect(55, 10, barLength, 3);
            }

            // create final image
            image = createImage(new FilteredImageSource(tempImage.getSource(), new KeyAlphaFilter(
                    TRANSPARENT)));
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

            graph.setColor(color);
            graph.drawPolygon(hexPoly);

            // create final image
            if (zoomIndex == BASE_ZOOM_INDEX) {
                image = createImage(new FilteredImageSource(tempImage
                        .getSource(), new KeyAlphaFilter(TRANSPARENT)));
            } else {
                image = getScaledImage(createImage(new FilteredImageSource(
                        tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))));
            }
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

            // draw entity image
            graph.drawImage(tileManager.imageFor(entity), 0, 0, this);

            // create final image
            if (zoomIndex == BASE_ZOOM_INDEX) {
                image = createImage(new FilteredImageSource(tempImage
                        .getSource(), new KeyAlphaFilter(TRANSPARENT)));
            } else {
                image = getScaledImage(createImage(new FilteredImageSource(
                        tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))));
            }
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

            // draw entity image
            graph.drawImage(tileManager.imageFor(entity, facing), 0, 0, this);

            // create final image
            if (zoomIndex == BASE_ZOOM_INDEX) {
                image = createImage(new FilteredImageSource(tempImage
                        .getSource(), new KeyAlphaFilter(TRANSPARENT)));
            } else {
                image = getScaledImage(createImage(new FilteredImageSource(
                        tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))));
            }
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

            default:
                break;
            }

            // create final image
            image = createImage(new FilteredImageSource(tempImage.getSource(), new KeyAlphaFilter(
                    TRANSPARENT)));
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

        ImageFilter filter;
        filter = new ImprovedAveragingScaleFilter(img.getWidth(null), img
                .getHeight(null), width, height);

        ImageProducer prod;
        prod = new FilteredImageSource(img.getSource(), filter);
        return Toolkit.getDefaultToolkit().createImage(prod);
    }
View Full Code Here

        public void loadFacings() {
            base = applyColor(base);

            icon = base.getScaledInstance(56, 48, Image.SCALE_SMOOTH);
            for (int i = 0; i < 6; i++) {
                ImageProducer rotSource = new FilteredImageSource(base
                        .getSource(), new RotateFilter((Math.PI / 3) * (6 - i)));
                facings[i] = parent.createImage(rotSource);
            }

            if (wreck != null) {
                wreck = applyColor(wreck);
                for (int i = 0; i < 6; i++) {
                    ImageProducer rotSource = new FilteredImageSource(wreck
                            .getSource(), new RotateFilter((Math.PI / 3)
                            * (6 - i)));
                    wreckFacings[i] = parent.createImage(rotSource);
                }
            }
View Full Code Here

            graph.drawString(shortName, tempRect.x + 1, tempRect.y
                    + tempRect.height - 1);

            // create final image
            if (zoomIndex == BASE_ZOOM_INDEX) {
                image = createImage(new FilteredImageSource(tempImage
                        .getSource(), new KeyAlphaFilter(TRANSPARENT)));
            } else {
                image = getScaledImage(createImage(new FilteredImageSource(
                        tempImage.getSource(), new KeyAlphaFilter(TRANSPARENT))));
            }
            graph.dispose();
            tempImage.flush();
        }
View Full Code Here

TOP

Related Classes of java.awt.image.FilteredImageSource

Copyright © 2018 www.massapicom. 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.