Examples of IImageLoader


Examples of ch.sahits.game.graphic.image.IImageLoader

   */
  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

  public BufferedImage createTiledImage(String imageName, int width, int heigth){
    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

* @param comp that is represented by the slab
* @param paintShadow indicates if the surrounding mortar has a different color
* @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

* @param paintShadow indicates if the surrounding mortar has a different color
* @param fileName file name of the image to be drawn
*/
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 org.eclipse.wb.internal.core.databinding.wizards.autobindings.IImageLoader

        InputStream stream = Activator.getFile("templates/GXTEditors.xml");
        Map<String, DescriptorContainer> containers =
            DescriptorContainer.parseDescriptors(
                stream,
                GxtDatabindingProvider.class.getClassLoader(),
                new IImageLoader() {
                  public Image getImage(String name) {
                    return Activator.getImage(name);
                  }
                });
        IOUtils.closeQuietly(stream);
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.