Codota Logo
MapLoader.getImage
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • onCreateOptionsMenu (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now