Tabnine Logo
MapLoader.getImage
Code IndexAdd Tabnine to your IDE (free)

How to use
getImage
method
in
jsettlers.logic.map.loading.MapLoader

Best Java code snippets using jsettlers.logic.map.loading.MapLoader.getImage (Showing top 3 results out of 315)

origin: jsettlers/settlers-remake

@Override
public short[] getImage() {
  return mapLoader.getImage();
}
origin: jsettlers/settlers-remake

public static BufferedImage createBufferedImageFrom(MapLoader mapLoader) {
  short[] data = mapLoader.getImage();
  int xOffset = MapFileHeader.PREVIEW_IMAGE_SIZE;
  BufferedImage img = new BufferedImage(MapFileHeader.PREVIEW_IMAGE_SIZE + xOffset,
      MapFileHeader.PREVIEW_IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB);
  xOffset--;
  for (int y = 0; y < MapFileHeader.PREVIEW_IMAGE_SIZE; y++) {
    for (int x = 0; x < MapFileHeader.PREVIEW_IMAGE_SIZE; x++) {
      int index = y * MapFileHeader.PREVIEW_IMAGE_SIZE + x;
      jsettlers.common.Color c = jsettlers.common.Color.fromShort(data[index]);
      img.setRGB(x + xOffset, y, c.getARGB());
    }
    if (xOffset > 1 && (y % 2 == 0)) {
      xOffset--;
    }
  }
  return img;
}
origin: jsettlers/settlers-remake

short[] data = value.getImage();
int xOffset = MapFileHeader.PREVIEW_IMAGE_SIZE;
BufferedImage img = new BufferedImage(MapFileHeader.PREVIEW_IMAGE_SIZE + xOffset,
jsettlers.logic.map.loadingMapLoadergetImage

Popular methods of MapLoader

  • getMaxPlayers
  • getCreationDate
  • getFileHeader
  • getLoaderForListedMap
  • getMapData
    Gets the map data for this loader, if the data is available.
  • getMapId
  • getMapName
  • getDescription
  • getListedMap
  • getMinPlayers
  • loadMainGrid
  • checkExtention
  • loadMainGrid,
  • checkExtention,
  • getPlayers,
  • isExtensionKnown

Popular in Java

  • Finding current android device location
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now