Examples of DrawImage()


Examples of java.awt.Graphics2D.drawImage()

      {
        scaleTransform = AffineTransform.getScaleInstance(scaleX, scaleY);
      }
    }

    while (g2.drawImage(image, scaleTransform, obs) == false)
    {
      obs.waitImageLoaded();
      if (obs.isError())
      {
        LogicalPageDrawable.logger.warn("Error while loading the image during the rendering.");
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

    final Graphics2D graphics = (Graphics2D) bi.getGraphics();
    graphics.scale(deviceScaleFactor, deviceScaleFactor);

    if (image instanceof BufferedImage)
    {
      if (graphics.drawImage(image, null, null) == false)
      {
        ExcelPrinter.logger.debug("Failed to render the image. This should not happen for BufferedImages");
      }
    }
    else
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

    else
    {
      final WaitingImageObserver obs = new WaitingImageObserver(image);
      obs.waitImageLoaded();

      while (graphics.drawImage(image, null, obs) == false)
      {
        obs.waitImageLoaded();
        if (obs.isError())
        {
          ExcelPrinter.logger.warn("Error while loading the image during the rendering.");
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

        if (invert)
        {
          final AffineTransform tx = new AffineTransform();
          tx.scale(1, -1);
          tx.translate(-xoffset, -yoffset);
          g.drawImage(img, tx, null);
        }
        g.dispose();
        // g = null;
        final com.lowagie.text.Image image = com.lowagie.text.Image.getInstance(img, null);
        final PdfPatternPainter pattern = cb.createPattern(width, height);
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

    final BufferedImage bImage = new BufferedImage((int) (width * scale), (int) (height * scale), BufferedImage.TYPE_INT_ARGB);

    final Graphics2D graph = bImage.createGraphics();
    graph.setTransform(AffineTransform.getScaleInstance(scale, scale));
    graph.drawImage(source, AffineTransform.getScaleInstance(scale, scale), null);
    graph.dispose();
    return bImage;
  }

  public static void main(final String[] args)
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

    Color bgColor = null;
    Graphics2D g2d = outImage.createGraphics();
    g2d.setColor(bgColor);
    g2d.fillRect(0, 0, scaledW, scaledH);
    g2d.drawImage(inImage, tx, null);
    g2d.dispose();

    label.setIcon(new ImageIcon(outImage));
    label.setProperty("horizontalAlignment", new Integer(JLabel.CENTER));
    label.setProperty("opaque", Boolean.TRUE);
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

        }

        if (!(image instanceof BufferedImage)) {
            sourceImage = new BufferedImage(image.getWidth(this), image.getHeight(this), BufferedImage.TYPE_INT_ARGB);
            Graphics2D g2D = sourceImage.createGraphics();
            g2D.drawImage(image, 0, 0, this);
        } else {
            sourceImage = (BufferedImage) image;
        }

        width = sourceImage.getWidth();
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

                /*
                 * Drawing original image whithout transparence and in the
                 * initial position
                 */
                if (leaveShadow) {
                    gr2d.drawImage(bufferedMapImage, 0, 0, null);
                } else {
                    gr2d.setPaint(mb.getBckgrnd());
                    gr2d.fillRect(0, 0, mb.getWidth(), mb.getHeight());
                }

View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

                /*
                 * Drawing image whith transparence and in the mouse position
                 * minus origianl mouse click position
                 */
                gr2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opaqueness));
                gr2d.drawImage(bufferedMapImage, x - oX, y - oY, null);

                ((Graphics2D) mb.getGraphics()).drawImage(bufferedRenderingImage, 0, 0, null);
            }
        }
        super.mouseDragged(arg0);
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

                    h,
                    imageType);
        } else {
            BufferedImage bufferedImage = new BufferedImage(w, h, imageType);
            Graphics2D g2d = bufferedImage.createGraphics();
            g2d.drawImage(image, x, y, null);
            g2d.dispose();
            return bufferedImage;
        }
    }
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.