Examples of loadImage()


Examples of ch.sahits.game.graphic.image.IImageLoader.loadImage()

  private synchronized Dimension getImageDimesnion(String fileName){
    if (imgDimensionCache.containsKey(fileName)){
      return imgDimensionCache.get(fileName);
    } else {
      IImageLoader loader = new ImagesLoader();
      BufferedImage baseImg = loader.loadImage(fileName);
      Dimension dim = new Dimension(baseImg.getWidth(), baseImg.getHeight());
      imgDimensionCache.put(fileName, dim);
      return dim;
    }
  }
View Full Code Here

Examples of ch.sahits.game.graphic.image.IImageLoader.loadImage()

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gconf = gs.getDefaultConfiguration();
   
      IImageLoader loader = new ImagesLoader();
      BufferedImage baseImg = loader.loadImage(imageName);
      final int xSize = baseImg.getWidth();
      final int ySize = baseImg.getHeight();
      int vCount = width/xSize;
      if (width%xSize>0){
        vCount++;
View Full Code Here

Examples of ch.sahits.game.graphic.image.IImageLoader.loadImage()

* @param fileName file name of the image to be drawn
*/
private void drawSlab(Graphics graphics, Rectangle bounds, String fileName, int reduce) {
  IImageLoader loader = new ImagesLoader();
   
    BufferedImage img = loader.loadImage(fileName);
    final int posX=bounds.x;
    final int posY=bounds.y;
    final int destWidth= (int)Math.rint(bounds.getWidth())-reduce;
    final int destHight=(int)Math.rint(bounds.getHeight());

View Full Code Here

Examples of ch.sahits.game.graphic.image.IImageLoader.loadImage()

*/
private BufferedImage createSlab(Graphics graphics, String text,
    String fileName, int reduce, Rectangle bounds) {
  IImageLoader loader = new ImagesLoader();
   
    BufferedImage img = loader.loadImage(fileName);
    final int destWidth= (int)Math.rint(bounds.getWidth())-reduce;
    final int destHight=(int)Math.rint(bounds.getHeight());

    float xScale = (float) destWidth / img.getWidth();
    float yScale = (float) destHight / img.getHeight();
View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

* @param fileName file name of the image to be drawn
*/
private void drawSlab(Graphics graphics, Rectangle bounds, String fileName, int reduce) {
  ImagesLoader loader = new ImagesLoader();
   
    BufferedImage img = loader.loadImage(fileName);
    final int posX=bounds.x;
    final int posY=bounds.y;
    final int destWidth= (int)Math.rint(bounds.getWidth())-reduce;
    final int destHight=(int)Math.rint(bounds.getHeight());

View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

*/
private BufferedImage createSlab(Graphics graphics, String text,
    String fileName, int reduce, Rectangle bounds) {
  ImagesLoader loader = new ImagesLoader();
   
    BufferedImage img = loader.loadImage(fileName);
    final int destWidth= (int)Math.rint(bounds.getWidth())-reduce;
    final int destHight=(int)Math.rint(bounds.getHeight());

    float xScale = (float) destWidth / img.getWidth();
    float yScale = (float) destHight / img.getHeight();
View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

  private synchronized Dimension getImageDimesnion(String fileName){
    if (imgDimensionCache.containsKey(fileName)){
      return imgDimensionCache.get(fileName);
    } else {
      ImagesLoader loader = new ImagesLoader();
      BufferedImage baseImg = loader.loadImage(fileName);
      Dimension dim = new Dimension(baseImg.getWidth(), baseImg.getHeight());
      imgDimensionCache.put(fileName, dim);
      return dim;
    }
  }
View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    GraphicsDevice gs = ge.getDefaultScreenDevice();
    GraphicsConfiguration gconf = gs.getDefaultConfiguration();
   
      ImagesLoader loader = new ImagesLoader();
      BufferedImage baseImg = loader.loadImage(imageName);
      final int xSize = baseImg.getWidth();
      final int ySize = baseImg.getHeight();
      int vCount = width/xSize;
      if (width%xSize>0){
        vCount++;
View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

      }
    }
    // Draw spinner buttons
    int xSpaceing = img.getWidth();
      ImagesLoader loader = new ImagesLoader();
      BufferedImage icon = loader.loadImage("SlabUp.png");
    int h = icon.getHeight();
    g.drawImage( icon, rect.x+xSpaceing,rect.y,null);
    upSpinner = new Rectangle(rect.x+xSpaceing, rect.y, icon.getWidth(), icon.getHeight());
      icon = loader.loadImage("SlabDown.png");
    g.drawImage(icon, rect.x+xSpaceing,rect.y+h,null);
View Full Code Here

Examples of ch.sahits.game.graphic.image.ImagesLoader.loadImage()

      ImagesLoader loader = new ImagesLoader();
      BufferedImage icon = loader.loadImage("SlabUp.png");
    int h = icon.getHeight();
    g.drawImage( icon, rect.x+xSpaceing,rect.y,null);
    upSpinner = new Rectangle(rect.x+xSpaceing, rect.y, icon.getWidth(), icon.getHeight());
      icon = loader.loadImage("SlabDown.png");
    g.drawImage(icon, rect.x+xSpaceing,rect.y+h,null);
    downSpinner = new Rectangle(rect.x+xSpaceing,rect.y+h, icon.getWidth(), icon.getHeight());
   
  }
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.