Java BufferedImage Operation layer(BufferedImage source, BufferedImage destination, int x, int y)

Here you can find the source of layer(BufferedImage source, BufferedImage destination, int x, int y)

Description

layer

License

Open Source License

Declaration

public static final BufferedImage layer(BufferedImage source, BufferedImage destination, int x, int y) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.awt.AlphaComposite;
import java.awt.Graphics2D;

import java.awt.image.BufferedImage;

public class Main {
    public static final BufferedImage layer(BufferedImage source, BufferedImage destination, int x, int y) {
        Graphics2D graphics = destination.createGraphics();
        graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));
        graphics.drawImage(source, null, null);
        graphics.dispose();/*from   www.  ja va2 s.  c o m*/

        return destination;
    }
}

Related

  1. indexToDirectColorModel(BufferedImage image)
  2. intBuffer2BufferedImage(IntBuffer ib, BufferedImage img)
  3. intensityArrayToBufferedImage(byte[] array, int w, int h)
  4. interp(BufferedImage img1, BufferedImage img2, int weight1, int weight2)
  5. knit(BufferedImage[] buffImages)
  6. makeBinary(BufferedImage image, int threshold)
  7. makeCursor(BufferedImage img, int hotx, int hoty, String name)
  8. makeGhost(BufferedImage image)
  9. makeImageTranslucent(BufferedImage source, float alpha)