Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.Pixmap


        //fillTransparencyMap();
    }
   
   
    public GDXImageCatalog(AtlasRegion fromRegion) {       
        this (fromRegion, new Pixmap (Gdx.files.getFileHandle(Detonator.INSTANCE.gameDataDir+"/img/"+fromRegion.name+".png", Files.FileType.Internal)));

        //Log.info("NAMENAMENAME: "+fromRegion.name);
       
        //fillTransparencyMap();
    }
View Full Code Here


          + config.fullscreen);

      if (config.iconPaths.size > 0) {
        ByteBuffer[] icons = new ByteBuffer[config.iconPaths.size];
        for (int i = 0, n = config.iconPaths.size; i < n; i++) {
          Pixmap pixmap = new Pixmap(Gdx.files.getFileHandle(config.iconPaths.get(i), config.iconFileTypes.get(i)));
          if (pixmap.getFormat() != Format.RGBA8888) {
            Pixmap rgba = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGBA8888);
            rgba.drawPixmap(pixmap, 0, 0);
            pixmap = rgba;
          }
          icons[i] = ByteBuffer.allocateDirect(pixmap.getPixels().limit());
          icons[i].put(pixmap.getPixels()).flip();
          pixmap.dispose();
View Full Code Here

  Pixmap pixmap;

  @Override
  public void loadAsync (AssetManager manager, String fileName, FileHandle file, PixmapParameter parameter) {
    pixmap = null;
    pixmap = new Pixmap(file);
  }
View Full Code Here

    pixmap = new Pixmap(file);
  }

  @Override
  public Pixmap loadSync (AssetManager manager, String fileName, FileHandle file, PixmapParameter parameter) {
    Pixmap pixmap = this.pixmap;
    this.pixmap = null;
    return pixmap;
  }
View Full Code Here

          + config.fullscreen);

      if (config.iconPaths.size > 0) {
        ByteBuffer[] icons = new ByteBuffer[config.iconPaths.size];
        for (int i = 0, n = config.iconPaths.size; i < n; i++) {
          Pixmap pixmap = new Pixmap(Gdx.files.getFileHandle(config.iconPaths.get(i), config.iconFileTypes.get(i)));
          if (pixmap.getFormat() != Format.RGBA8888) {
            Pixmap rgba = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGBA8888);
            rgba.drawPixmap(pixmap, 0, 0);
            pixmap = rgba;
          }
          icons[i] = ByteBuffer.allocateDirect(pixmap.getPixels().limit());
          icons[i].put(pixmap.getPixels()).flip();
          pixmap.dispose();
View Full Code Here

    return rect;
  }
 
  private void newPage() {
    Page page = new Page();
    page.image = new Pixmap(pageWidth, pageHeight, pageFormat);
    page.root =  new Node(0, 0, pageWidth, pageHeight, null, null, null);
    page.rects = new OrderedMap<String, Rectangle>();
    pages.add(page);
    currPage = page;
  }
View Full Code Here

  void loadSkeleton (FileHandle skeletonFile, boolean reload) {
    if (skeletonFile == null) return;

    // A regular texture atlas would normally usually be used. This returns a white image for images not found in the atlas.
    Pixmap pixmap = new Pixmap(32, 32, Format.RGBA8888);
    pixmap.setColor(new Color(1, 1, 1, 0.33f));
    pixmap.fill();
    final AtlasRegion fake = new AtlasRegion(new Texture(pixmap), 0, 0, 32, 32);
    pixmap.dispose();

    String atlasFileName = skeletonFile.nameWithoutExtension();
    if (atlasFileName.endsWith(".json")) atlasFileName = new FileHandle(atlasFileName).nameWithoutExtension();
    FileHandle atlasFile = skeletonFile.sibling(atlasFileName + ".atlas");
    if (!atlasFile.exists()) atlasFile = skeletonFile.sibling(atlasFileName + ".atlas.txt");
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.Pixmap

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.