Java Draw Image draw(BufferedImage image, Rectangle rectangle, BufferedImage backgroundImg)

Here you can find the source of draw(BufferedImage image, Rectangle rectangle, BufferedImage backgroundImg)

Description

draw

License

Apache License

Declaration

public static void draw(BufferedImage image, Rectangle rectangle, BufferedImage backgroundImg) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.awt.*;

import java.awt.image.BufferedImage;

public class Main {
    public static void draw(BufferedImage image, Rectangle rectangle, BufferedImage backgroundImg) {
        Graphics2D g = backgroundImg.createGraphics();
        if (rectangle == null) {
            g.drawImage(image, 0, 0, null);
        } else {// w  w w  . j  av a2s .c  om
            g.drawImage(image, rectangle.x, rectangle.y, null);
        }
        g.dispose();
    }
}

Related

  1. draw(BufferedImage image, Consumer action)
  2. draw(final Image img, final int type)
  3. draw4on1(BufferedImage[] src, BufferedImage dst)
  4. draw9Patch(BufferedImage image, Integer[] patches, float ratio)
  5. drawBorder(BufferedImage buffImage)