Examples of bufferImage()


Examples of org.mage.plugins.card.utils.BufferedImageBuilder.bufferImage()

    if (imageSickness == null) {
      Image image = getImageFromResourceTransparent("/sickness.png", Color.WHITE, new Rectangle(296, 265));
      Toolkit tk = Toolkit.getDefaultToolkit();
      image = tk.createImage(new FilteredImageSource(image.getSource(), new CropImageFilter(0, 0, 200, 285)));
      BufferedImageBuilder builder = new BufferedImageBuilder();
      imageSickness = builder.bufferImage(image, BufferedImage.TYPE_INT_ARGB);
    }
    return imageSickness;
  }

  protected static Image getImageFromResourceTransparent(String path, Color mask, Rectangle rec) {
View Full Code Here

Examples of org.mage.plugins.card.utils.BufferedImageBuilder.bufferImage()

      File file = new File(Constants.RESOURCE_PATH_MANA_LARGE + "/" + symbol + ".jpg");
      BufferedImageBuilder builder = new BufferedImageBuilder();
      Rectangle r = new Rectangle(11, 11);
      try {
        Image image = UI.getImageIcon(file.getAbsolutePath()).getImage();
        BufferedImage resized = ImageCache.getResizedImage(builder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
        manaImages.put(symbol, resized);
      } catch (Exception e) {}
      file = new File(Constants.RESOURCE_PATH_MANA_MEDIUM + "/" + symbol + ".jpg");
      try {
        Image image = UI.getImageIcon(file.getAbsolutePath()).getImage();
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.