Examples of drawImage()


Examples of java.awt.Graphics2D.drawImage()

                if (h < height) h = height;
            }
            BufferedImage tmp = new BufferedImage(w, h, type);
            Graphics2D g2 = tmp.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            g2.drawImage(ret, 0, 0, w, h, null);
            g2.dispose();
            ret = tmp;
        }
        return ret;
    }
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

      final Graphics2D g2 = tmp.createGraphics();
      g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hintValue);
      // this one scales the image ..
      if (ret instanceof BufferedImage)
      {
        if (g2.drawImage(ret, 0, 0, w, h, null) == false)
        {
          logger.debug("Failed to scale the image. This should not happen.");
        }
      }
      else
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

        }
      }
      else
      {
        final WaitingImageObserver obs = new WaitingImageObserver(ret);
        while (g2.drawImage(ret, 0, 0, w, h, null) == false)
        {
          obs.waitImageLoaded();
          if (obs.isError())
          {
            logger.warn("Error while loading the image during the rendering.");
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

        g2d.fillRect(0, 0, getWidth(), getHeight());
       
        if (icon != null) {
            int centerX = ((super.getWidth() - icon.getIconWidth()) / 2);
            int centerY = ((super.getHeight() - icon.getIconHeight()) / 2);
            g2d.drawImage(icon.getImage(), centerX, centerY, this);
        }
        g2d.dispose();
    }   

    public void flush() {
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

                if (h < height) h = height;
            }
            BufferedImage tmp = new BufferedImage(w, h, type);
            Graphics2D g2 = tmp.createGraphics();
            g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
            g2.drawImage(ret, 0, 0, w, h, null);
            g2.dispose();
            ret.flush();
            ret = tmp;
        }
        return ret;
View Full Code Here

Examples of java.awt.Graphics2D.drawImage()

        Graphics2D g2 = (Graphics2D) splashBufferedImage.getGraphics();

        try {
            Robot robot = new Robot(getGraphicsConfiguration().getDevice());
            BufferedImage capture = robot.createScreenCapture(new Rectangle(windowRect.x, windowRect.y, windowRect.width + extra, windowRect.height + extra));
            g2.drawImage(capture, null, 0, 0);
        } catch (AWTException e) { }

        g2.drawImage(image, 0, 0, this);
    }
View Full Code Here

Examples of javafx.scene.canvas.GraphicsContext.drawImage()

            // Draw into a canvas and then apply the effect, because if we snapshotted the image view, we'd end up
            // with the rounded corners which we don't want.
            Image image = new Image(getResource("default-cover-image.png").openStream());
            Canvas canvas = new Canvas(image.getWidth(), image.getHeight());
            GraphicsContext gc = canvas.getGraphicsContext2D();
            gc.drawImage(image, 0, 0);
            gc.applyEffect(colorAdjust);
            WritableImage colouredImage = new WritableImage((int) image.getWidth(), (int) image.getHeight());
            canvas.snapshot(new SnapshotParameters(), colouredImage);
            coverImageView.setImage(colouredImage);
            // Convert to a PNG and store in the project model.
View Full Code Here

Examples of javax.media.j3d.J3DGraphics2D.drawImage()

          // if it's modified in the EDT while this method draws it
          BufferedImage navigationPanelImage = HomeComponent3D.this.navigationPanelImage;
          // Render navigation panel upon canvas 3D if it exists
          if (navigationPanelImage != null) {
            J3DGraphics2D g2D = canvas3D.getGraphics2D();
            g2D.drawImage(navigationPanelImage, null, 0, 0);
            g2D.flush(true);
          }
        }
      });
    }
View Full Code Here

Examples of javax.microedition.lcdui.Graphics.drawImage()

        Graphics g = frontLayer.getGraphics();
        for (int i = 0; i <= xmax; ++i)
        {
          for (int j = 0; j <= ymax; ++j)
          {
            g.drawImage(tile, i * tw, j * th, Graphics.TOP | Graphics.LEFT);
          }
        }
      } catch (IOException e)
      {
        e.printStackTrace();
View Full Code Here

Examples of magick.MagickImage.drawImage()

            // Put a red rectangle around the border
            DrawInfo drawInfo = new DrawInfo(new ImageInfo());
            drawInfo.setPrimitive("Rectangle 10 10 190 90");
            drawInfo.setStroke(PixelPacket.queryColorDatabase("red"));
            drawInfo.setFill(PixelPacket.queryColorDatabase("white"));
            blankImage.drawImage(drawInfo);

            // Annotate the image with a green Hello
            ImageInfo blankImageInfo = new ImageInfo();
            DrawInfo annotateInfo = new DrawInfo(blankImageInfo);
            annotateInfo.setOpacity(0);
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.