Package java.awt

Examples of java.awt.Graphics.drawImage()


        // create an ARGB image
        int width = image.getWidth();
        int height = image.getHeight();
        BufferedImage argbImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
        Graphics ag = argbImage.getGraphics();
        ag.drawImage(image, 0, 0, null);
        ag.dispose();

        for (int x = 0; x < argbImage.getWidth(); ++x)
        {
            for (int y = 0; y < argbImage.getHeight(); ++y)
View Full Code Here


        // create an ARGB image
        int width = image.getWidth();
        int height = image.getHeight();
        BufferedImage argbImage = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR);
        Graphics ag = argbImage.getGraphics();
        ag.drawImage(image, 0, 0, null);
        ag.dispose();

        for (int x = 0; x < argbImage.getWidth(); ++x)
        {
            for (int y = 0; y < argbImage.getHeight(); ++y)
View Full Code Here

        checkIdent(image, ximage1.getImage());

        // Create a grayscale image
        BufferedImage grayImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
        Graphics g = grayImage.getGraphics();
        g.drawImage(image, 0, 0, null);
        g.dispose();
        PDImageXObject ximage2 = LosslessFactory.createFromImage(document, grayImage);
        validate(ximage2, 8, grayImage.getWidth(), grayImage.getHeight(), "png", PDDeviceGray.INSTANCE.getName());
        checkIdent(grayImage, ximage2.getImage());
View Full Code Here

        public Raster getLuminosityRaster()
        {
            BufferedImage gray = new BufferedImage(width, height, BufferedImage.TYPE_BYTE_GRAY);
            Graphics g = gray.getGraphics();
            g.drawImage(image, 0, 0, null);
            g.dispose();

            return gray.getRaster();
        }
    }
View Full Code Here

    protected void paintComponent(Graphics g) {
      super.paintComponent(g);
      if (captured != null && root != null && rootBounds != null && designBorder != null) {
        Insets insets = designBorder.getBorderInsets(this);
        Graphics clipg = g.create(insets.left, insets.top, root.getWidth(), root.getHeight());
        clipg.drawImage(captured, 0, 0, this);
        clipg.dispose();
      }
    }
  }
View Full Code Here

    try
    {
      while (this.lock && error == false)
      {
        lastUpdate = System.currentTimeMillis();
        if (g.drawImage(this.image, 0, 0, img.getWidth(this), img.getHeight(this), this))
        {
          return;
        }

        try
View Full Code Here

         * @return the merged Image.
         */
        Image mergeImages(Image foregroundImage, Image backgroundImage) {
            BufferedImage image = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
            Graphics graphics = image.getGraphics();
            graphics.drawImage(backgroundImage, 0, 0, 32, 32, this);
            graphics.drawImage(foregroundImage, 0, 0, 32, 32, this);
            return image;
        }
    }
   
View Full Code Here

         */
        Image mergeImages(Image foregroundImage, Image backgroundImage) {
            BufferedImage image = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
            Graphics graphics = image.getGraphics();
            graphics.drawImage(backgroundImage, 0, 0, 32, 32, this);
            graphics.drawImage(foregroundImage, 0, 0, 32, 32, this);
            return image;
        }
    }
   
    /**
 
View Full Code Here

           * @return the merged Image.
           */
          Image mergeImages(Image foregroundImage, Image backgroundImage) {
              BufferedImage image = new BufferedImage(34, 34, BufferedImage.TYPE_INT_ARGB);
              Graphics graphics = image.getGraphics();
              graphics.drawImage(backgroundImage, 0, 0, 34, 34, this);
              graphics.drawImage(foregroundImage, 0, 0, 34, 34, this);
              return image;
          }
        }
    }
View Full Code Here

           */
          Image mergeImages(Image foregroundImage, Image backgroundImage) {
              BufferedImage image = new BufferedImage(34, 34, BufferedImage.TYPE_INT_ARGB);
              Graphics graphics = image.getGraphics();
              graphics.drawImage(backgroundImage, 0, 0, 34, 34, this);
              graphics.drawImage(foregroundImage, 0, 0, 34, 34, this);
              return image;
          }
        }
    }
}
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.