Package org.mage.plugins.card.utils

Examples of org.mage.plugins.card.utils.BufferedImageBuilder


  public BufferedImage getSicknessImage() {
    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;
  }
View Full Code Here


  static public void loadImages () {
    String[] symbols = new String[] {"0", "1", "10", "11", "12", "15", "16", "2", "3", "4", "5", "6", "7", "8", "9", "B", "BG",
      "BR", "G", "GU", "GW", "R", "RG", "RW", "S", "T", "U", "UB", "UR", "W", "WB", "WU", "X", "Y", "Z", "slash"};
    for (String symbol : symbols) {
      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

Related Classes of org.mage.plugins.card.utils.BufferedImageBuilder

Copyright © 2018 www.massapicom. 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.